home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / windows / wbt31a.zip / NEWSTUFF.TX$ < prev    next >
Text File  |  1992-02-20  |  127KB  |  5,403 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                         Update Manual
  8.                              for
  9.                          Command Post
  10.                              and
  11.                            WinBatch
  12.  
  13.  
  14.  
  15.  
  16.  
  17.        This document is an addendum to the manuals for
  18.        Command Post and WinBatch, and covers new
  19.        functions and features added since the manuals
  20.        for those programs went to press.
  21.  
  22.  
  23.  
  24.        Items marked with an asterisk (*) are new in
  25.        Command Post, but are already covered in the
  26.        WinBatch documentation.
  27.  
  28.  
  29.  
  30.        Items marked (CP only) are available only in
  31.        Command Post.
  32.  
  33.        Items marked (WB only) are available only in
  34.        WinBatch.
  35.  
  36.  
  37.  
  38.        "WIL Interpreter" is a generic term which
  39.        refers both to Command Post and to WinBatch.
  40.  
  41.        "WIL program" is a generic term which refers
  42.        both to a Command Post menu item and to a
  43.        WinBatch WBT file.
  44.  
  45.  
  46.        
  47.      (i) indicates an integer parameter or return
  48.      value.
  49.  
  50.  
  51.  
  52.  
  53.      (s) indicates a string parameter or return
  54.      value.
  55.  
  56.  
  57.  
  58.      Please refer to the approprate program manual
  59.      for information on anything not covered here.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.      ii
  99.  
  100.                                       WIL Update Manual
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.                            CONTENTS
  108.  
  109.  
  110.  
  111.  
  112.        CONTENTS                            ii
  113.  
  114.        NEW FUNCTIONS                        1
  115.           AskPassword                       1
  116.           DDEExecute                        1
  117.           DDEInitiate                       2
  118.           DDEPoke                           3
  119.           DDERequest                        4
  120.           DDETerminate                      5
  121.           DDETimeout                        6
  122.           DialogBox*                        6
  123.           DirRename*                        8
  124.           DirWindows                        8
  125.           DiskHide (CP only)                9
  126.           DiskReset (CP only)               9
  127.           DiskScan                         10
  128.           DiskUpdate (CP only)             11
  129.           DOSVersion*                      11
  130.           Exclusive*                       12
  131.           FileAppend*                      13
  132.           FileAttrGet                      13
  133.           FileAttrSet                      14
  134.           FileClose*                       15
  135.           FileExtension*                   16
  136.           FileHilite (CP only)             16
  137.           FileOpen*                        17
  138.           FilePath*                        18
  139.           FileRead*                        18
  140.           FileRoot*                        19
  141.           FileTimeGet                      19
  142.           FileTimeTouch                    20
  143.           FileWrite*                       21
  144.           Goto*                            22
  145.           IconArrange                      22
  146.           If...Then*                       23
  147.           IgnoreInput*                     23
  148.  
  149.  
  150.                                                     iii
  151.  
  152.      WIL Update Manual
  153.  
  154.  
  155.  
  156.        IniDelete                        24
  157.        IniDeletePvt                     24
  158.        IniItemize                       25
  159.        IniItemizePvt                    26
  160.        IniReadPvt*                      26
  161.        IniWritePvt*                     27
  162.        IntControl                       28
  163.        IsKeyDown*                       31
  164.        IsLicensed*                      32
  165.        ItemCount*                       32
  166.        ItemExtract*                     33
  167.        MouseInfo                        34
  168.        NetAddCon                        35
  169.        NetBrowse                        36
  170.        NetCancelCon                     37
  171.        NetDialog                        37
  172.        NetGetCaps                       38
  173.        NetGetCon                        39
  174.        NetGetUser                       40
  175.        ParseData*                       40
  176.        PlayMedia                        41
  177.        PlayMidi                         43
  178.        PlayWaveForm                     43
  179.        SendKey*                         44
  180.        SKDebug*                         46
  181.        SnapShot                         47
  182.        Sounds                           48
  183.        StrReplace*                      48
  184.        TextSelect                       49
  185.        WaitForKey                       50
  186.        WallPaper*                       51
  187.        WinConfig*                       51
  188.        WinExeName                       52
  189.        WinExist*                        53
  190.        WinMetrics                       53
  191.        WinName                          56
  192.        WinParmGet                       56
  193.        WinParmSet                       57
  194.        WinPlaceGet                      58
  195.        WinPlaceSet                      59
  196.        WinPosition*                     60
  197.        WinResources                     61
  198.        WinState                         61
  199.  
  200.  
  201.  
  202.      iv
  203.  
  204.                                       WIL Update Manual
  205.  
  206.  
  207.  
  208.        OTHER FEATURES                      63
  209.           Changes to both Command Post and
  210.           WinBatch                         63
  211.             :CANCEL                        63
  212.             Default program for unknown
  213.             extension                      63
  214.             Better pro launch diagnostics  64
  215.             New INI file                   64
  216.             Improved Display function      64
  217.             Longer Delay                   64
  218.             Change in DialogBox            64
  219.             Partial windowname option      65
  220.             Improved StrTrim               65
  221.             Noise                          65
  222.             FileOpen error message         65
  223.           Changes to Command Post only     65
  224.             Hotkeys                        65
  225.             Multiple menu levels           66
  226.             Window placement on startup    66
  227.             Terminate Windows option       67
  228.             File attribute display         67
  229.             Hidden and System files        67
  230.             Parent directory (dot dot)     67
  231.             Program run options            67
  232.             Non-displayed menu items       67
  233.  
  234.        DIALOG BOXES                        68
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.                                                       v
  255.  
  256.                                       WIL Update Manual
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.                         NEW FUNCTIONS
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.        AskPassword
  271.        Prompts the user for a password.
  272.  
  273.  
  274.        Syntax:
  275.         AskPassword (title, prompt)
  276.  
  277.        Parameters:
  278.         (s) title title of the dialog box.
  279.         (s) prompt    question to be put to the user.
  280.  
  281.        Returns:
  282.         (s)       user response.
  283.  
  284.        Pops up a special dialog box to ask for
  285.        passwords.  An asterisk (*) is echoed for each
  286.        character that the user types; the actual
  287.        characters entered are not displayed.
  288.  
  289.  
  290.        Example:
  291.         pw = AskPassword("Security check", "Please
  292.         enter your password")
  293.         If StriCmp(pw, "winguy") != 0 Then Goto nogo
  294.         Run(Environment("COMSPEC"), "")
  295.         Exit
  296.         :nogo
  297.         Pause("Security breach", "Invalid password
  298.         entered")
  299.  
  300.  
  301.        See Also:
  302.           AskLine, AskYesNo, DialogBox
  303.  
  304.  
  305.  
  306.                                                       1
  307.  
  308.      WIL Update Manual
  309.  
  310.  
  311.  
  312.      DDEExecute
  313.      Sends commands to a DDE server application.
  314.  
  315.  
  316.      Syntax:
  317.       DDEExecute (channel, command string)
  318.  
  319.      Parameters:
  320.       (i) channel        same integer that was
  321.                 returned by DDEInitiate.
  322.       (s) command string one or more commands to be
  323.                 executed by the server app.
  324.  
  325.      Returns:
  326.       (i)           @TRUE if successful; @FALSE if
  327.                 unsuccessful.
  328.  
  329.      Use the DDEInitiate function to obtain a
  330.      channel number.
  331.  
  332.      In order to use this function successfully, you
  333.      will need appropriate documentation for the
  334.      server application you wish to access, which
  335.      must provide information on the DDE functions
  336.      that it supports and the correct syntax to use.
  337.  
  338.  
  339.      Example:
  340.       Run("wincheck.exe", "TUT")
  341.       channel = DDEInitiate("wincheck", "TUT")
  342.       If channel == 0 Then Goto failed
  343.       result = DDEExecute(channel,
  344.       '[WriteCheck:p="Shorewood 
  345.           Apartments",t=580.00,l="Rent"]')
  346.       DDETerminate(channel)
  347.       WinClose("WinCheck")
  348.       If result == @FALSE Then Goto Failed
  349.       Message("DDE Execute", "Operation complete")
  350.       Exit
  351.       :failed
  352.       Message("DDE operation unsuccessful", "Check
  353.       your syntax")
  354.  
  355.  
  356.  
  357.  
  358.      2
  359.  
  360.                                       WIL Update Manual
  361.  
  362.  
  363.  
  364.        See Also:
  365.           DDEInitiate, DDEPoke, DDERequest,
  366.           DDETerminate, DDETimeout
  367.  
  368.  
  369.  
  370.  
  371.        DDEInitiate
  372.        Opens a DDE channel.
  373.  
  374.  
  375.        Syntax:
  376.         DDEInitiate (app name, topic name)
  377.  
  378.        Parameters:
  379.         (s) app name  name of the application (without
  380.                   the EXE extension).
  381.         (s) topic name     name of the topic you wish
  382.                   to access.
  383.  
  384.        Returns:
  385.         (i)       communications channel.
  386.  
  387.        This function opens a DDE communications
  388.        channel with a server application.  The
  389.        communications channel can be subsequently used
  390.        by the DDEExecute, DDEPoke, and DDERequest
  391.        functions.  You should close this channel with
  392.        DDETerminate when you are finished using it.
  393.        If the communications channel cannot be opened
  394.        as requested, DDEInitiate returns a channel
  395.        number of 0.
  396.  
  397.        You can call DDEInitiate more than once, in
  398.        order to carry on multiple DDE conversations
  399.        (with multiple applications) simultaneously.
  400.  
  401.        In order to use this function successfully, you
  402.        will need appropriate documentation for the
  403.        server application you wish to access, which
  404.        must provide information on the DDE functions
  405.        that it supports and the correct syntax to use.
  406.  
  407.  
  408.  
  409.  
  410.                                                       3
  411.  
  412.      WIL Update Manual
  413.  
  414.  
  415.  
  416.      Example:
  417.       Run("wincheck.exe", "TUT")
  418.       channel = DDEInitiate("WinCheck", "TUT")
  419.       If channel == 0 Then Goto failed
  420.       output = DDERequest(channel, "GetChecking")
  421.       DDETerminate(channel)
  422.       WinClose("WinCheck")
  423.       If output == "" Then Goto Failed
  424.       Message("Account balance", output)
  425.       Exit
  426.       :failed
  427.       Message("DDE operation unsuccessful", "Check
  428.       your syntax")
  429.  
  430.  
  431.      See Also:
  432.        DDEExecute, DDEPoke, DDERequest,
  433.        DDETerminate, DDETimeout
  434.  
  435.  
  436.  
  437.  
  438.      DDEPoke
  439.      Sends data to a DDE server application.
  440.  
  441.  
  442.      Syntax:
  443.       DDEPoke (channel, item name, item value)
  444.  
  445.      Parameters:
  446.       (i) channel        same integer that was returned
  447.                          by DDEInitiate.
  448.       (s) item name      identifies the type of data
  449.                          being sent.
  450.       (s) item value     actual data to be sent to
  451.                          the server.
  452.  
  453.      Returns:
  454.       (i)       @TRUE if successful; @FALSE if
  455.                 unsuccessful.
  456.  
  457.      Use the DDEInitiate function to obtain a
  458.      channel number.
  459.  
  460.  
  461.  
  462.      4
  463.  
  464.                                       WIL Update Manual
  465.  
  466.  
  467.  
  468.        In order to use this function successfully, you
  469.        will need appropriate documentation for the
  470.        server application you wish to access, which
  471.        must provide information on the DDE functions
  472.        that it supports and the correct syntax to use.
  473.  
  474.  
  475.        Example:
  476.         Run("reminder.exe", "")
  477.         channel = DDEInitiate("Reminder", "items")
  478.         If channel == 0 Then Goto failed
  479.         result = DDEPoke(channel, "all", "11/3/92 Misc
  480.         Remember to vote")
  481.         DDETerminate(channel)
  482.         WinClose("Reminder")
  483.         If result == @FALSE Then Goto Failed
  484.         Message("DDE Poke", "Operation complete")
  485.         Exit
  486.         :failed
  487.         Message("DDE operation unsuccessful", "Check
  488.         your syntax")
  489.  
  490.  
  491.        See Also:
  492.           DDEExecute, DDEInitiate, DDERequest,
  493.           DDETerminate, DDETimeout
  494.  
  495.  
  496.  
  497.  
  498.        DDERequest
  499.        Gets data from a DDE server application.
  500.  
  501.  
  502.        Syntax:
  503.         DDERequest (channel, item name)
  504.  
  505.        Parameters:
  506.         (i) channel    same integer that was returned
  507.                        by DDEInitiate.
  508.         (s) item name  identifies the data to be
  509.                        returned by the server.
  510.  
  511.  
  512.  
  513.  
  514.                                                       5
  515.  
  516.      WIL Update Manual
  517.  
  518.  
  519.  
  520.      Returns:
  521.       (s)       information returned from the
  522.                 server.
  523.  
  524.      Use the DDEInitiate function to obtain a
  525.      channel number.
  526.  
  527.      In order to use this function successfully, you
  528.      will need appropriate documentation for the
  529.      server application you wish to access, which
  530.      must provide information on the DDE functions
  531.      that it supports and the correct syntax to use.
  532.  
  533.  
  534.      Example:
  535.       Run("wincheck.exe", "TUT")
  536.       channel = DDEInitiate("WinCheck", "TUT")
  537.       If channel == 0 Then Goto failed
  538.       output = DDERequest(channel, "GetChecking")
  539.       DDETerminate(channel)
  540.       WinClose("WinCheck")
  541.       If output == "" Then Goto Failed
  542.       Message("Account balance", output)
  543.       Exit
  544.       :failed
  545.       Message("DDE operation unsuccessful", "Check
  546.       your syntax")
  547.  
  548.  
  549.      See Also:
  550.        DDEExecute, DDEInitiate, DDEPoke,
  551.        DDETerminate, DDETimeout
  552.  
  553.  
  554.  
  555.  
  556.      DDETerminate
  557.      Closes a DDE channel.
  558.  
  559.  
  560.      Syntax:
  561.       DDETerminate (channel)
  562.  
  563.  
  564.  
  565.  
  566.      6
  567.  
  568.                                       WIL Update Manual
  569.  
  570.  
  571.  
  572.        Parameters:
  573.         (i) channel   same integer that was returned
  574.                       by DDEInitiate.
  575.  
  576.        Returns:
  577.         (i)       always 1.
  578.  
  579.        This function closes a communications channel
  580.        that was opened with DDEInitiate.
  581.  
  582.        Example:
  583.         Run("wincheck.exe", "TUT")
  584.         channel = DDEInitiate("WinCheck", "TUT")
  585.         If channel == 0 Then Goto failed
  586.         output = DDERequest(channel, "GetChecking")
  587.         DDETerminate(channel)
  588.         WinClose("WinCheck")
  589.         If output == "" Then Goto Failed
  590.         Message("Account balance", output)
  591.         Exit
  592.         :failed
  593.         Message("DDE operation unsuccessful", "Check
  594.         your syntax")
  595.  
  596.  
  597.        See Also:
  598.           DDEExecute, DDEInitiate, DDEPoke, DDERequest,
  599.           DDETimeout
  600.  
  601.  
  602.  
  603.  
  604.        DDETimeout
  605.        Sets the DDE timeout value.
  606.  
  607.  
  608.        Syntax:
  609.         DDETimeout (value)
  610.  
  611.        Parameters:
  612.         (i) value DDE timeout time.
  613.  
  614.        Returns:
  615.         (i)       previous timeout value.
  616.  
  617.  
  618.                                                       7
  619.  
  620.      WIL Update Manual
  621.  
  622.  
  623.  
  624.  
  625.      Sets the timeout time for subsequent DDE
  626.      functions to specified value in milliseconds
  627.      (1/1000 second).  Default is 3000 milliseconds
  628.      (3 seconds).  If the time elapses with no
  629.      response, the WIL Interpreter will return an
  630.      error.  The value set with DDETimeout stays in
  631.      effect until changed by another DDETimeout
  632.      statement or until the WIL program ends,
  633.      whichever comes first.
  634.  
  635.  
  636.      Example:
  637.       DDETimeout(5000)
  638.       Run("wincheck.exe", "TUT")
  639.       channel = DDEInitiate("WinCheck", "TUT")
  640.       If channel == 0 Then Goto failed
  641.       output = DDERequest(channel, "GetChecking")
  642.       DDETerminate(channel)
  643.       WinClose("WinCheck")
  644.       If output == "" Then Goto Failed
  645.       Message("Account balance", output)
  646.       Exit
  647.       :failed
  648.       Message("DDE operation unsuccessful", "Check
  649.       your syntax")
  650.  
  651.  
  652.      See Also:
  653.        DDEExecute, DDEInitiate, DDEPoke, DDERequest,
  654.        DDETerminate
  655.  
  656.  
  657.  
  658.  
  659.      DialogBox*
  660.      Pops up a Windows dialog box defined by the WBD
  661.      template file.
  662.  
  663.  
  664.      Syntax:
  665.       DialogBox (title, WBD file)
  666.  
  667.  
  668.  
  669.  
  670.      8
  671.  
  672.                                       WIL Update Manual
  673.  
  674.  
  675.  
  676.        Parameters:
  677.         (s) title     the title of the dialog box.
  678.         (s) WBD file  the name of the WBD template
  679.                       file.
  680.  
  681.        Returns:
  682.         (i)       always 0.
  683.  
  684.        Each element in the template file is enclosed
  685.        in square brackets, and consists of a variable
  686.        name, followed by one of the following symbols:
  687.  
  688.           Symbol Meaning           Example
  689.  
  690.             +    check box         [backup+1Save
  691.           backup]
  692.             #    edit box          [newfile#   ]
  693.             \    file selection listbox
  694.             [editfile\             ]
  695.             ^    radio button      [prog^1Note]
  696.           [prog^2Write]
  697.             $    variable          [var$]
  698.  
  699.        The number following the check box and radio
  700.        button symbols is the value which will get
  701.        assigned to the variable if its corresponding
  702.        box is checked, or button is selected.
  703.        Following the number is the descriptive text
  704.        which will appear next to the box or button.
  705.  
  706.        When used in conjunction with a file selection
  707.        list box variable with the same name, two of
  708.        these symbols have special meanings:
  709.  
  710.             #    file mask edit box
  711.             [editfile#             ]
  712.             $    directory variable
  713.             [editfile$             ]
  714.  
  715.        Anything not appearing within square brackets
  716.        is displayed as text.
  717.  
  718.  
  719.  
  720.  
  721.  
  722.                                                       9
  723.  
  724.      WIL Update Manual
  725.  
  726.  
  727.  
  728.      See the separate section on Dialog Boxes later
  729.      in this manual for more detailed information on
  730.      using this function.
  731.  
  732.  
  733.      Example:
  734.       DialogBox("Edit a file", "edit.wbd")
  735.       If backup == 0 Then Goto nobackup
  736.       filebackupname = StrCat(FileRoot(editfile),
  737.       ".", "bak")
  738.       FileCopy(editfile, filebackupname, @TRUE)
  739.       :nobackup
  740.       If prog == 1 Then Run("notepad.exe", editfile)
  741.       If prog == 2 Then
  742.       Run("c:\win\apps\winedit.exe", editfile)
  743.  
  744.      Here is the template file, EDIT.WBD:
  745.  
  746.       [editfile$       ]
  747.            File mask [editfile#    ]
  748.       [editfile\                      ]
  749.       [editfile\                      ]
  750.       [editfile\                      ]
  751.       [editfile\                      ]
  752.       [editfile\                      ]
  753.       [backup+1Save backup of file]
  754.       [prog^1Notepad]     [prog^2WinEdit]
  755.  
  756.  
  757.      See Also:
  758.        AskLine, AskPassword, AskYesNo, ItemSelect
  759.  
  760.  
  761.  
  762.  
  763.      DirRename*
  764.      Renames a directory.
  765.  
  766.  
  767.      Syntax:
  768.       DirRename ([d:]oldpath, [d:]newpath)
  769.  
  770.  
  771.  
  772.  
  773.  
  774.      10
  775.  
  776.                                       WIL Update Manual
  777.  
  778.  
  779.  
  780.        Parameters:
  781.         (s) oldpath   existing directory name, with
  782.                       optional drive.
  783.         (s) newpath   new name for directory.
  784.  
  785.        Returns:
  786.         (i)       @TRUE if the directory was
  787.                   successfully renamed;
  788.                   @FALSE if it wasn't.
  789.  
  790.  
  791.        Example:
  792.         DirRename("c:\temp", "c:\work")
  793.  
  794.  
  795.        See Also:
  796.           DirMake, DirRemove
  797.  
  798.  
  799.  
  800.  
  801.        DirWindows
  802.        Returns the name of the Windows or Windows
  803.        System directory.
  804.  
  805.  
  806.        Syntax:
  807.         DirWindows (request#)
  808.  
  809.        Parameters:
  810.         (i) request#  see below.
  811.  
  812.  
  813.        Returns:
  814.         (s)       directory name.
  815.  
  816.        This function returns the name of either the
  817.        Windows directory or the Windows System
  818.        directory, depending on the request# specified.
  819.  
  820.           Req#   Return value
  821.  
  822.           0      Windows directory
  823.           1      Windows System directory
  824.  
  825.  
  826.                                                      11
  827.  
  828.      WIL Update Manual
  829.  
  830.  
  831.  
  832.      Example:
  833.       DirChange(DirWindows(0))
  834.       ini = ItemSelect("Select file to edit",
  835.       FileItemize("*.ini"), " ")
  836.       Run("notepad.exe, ini)
  837.  
  838.  
  839.      See Also:
  840.        DirHome
  841.  
  842.  
  843.  
  844.  
  845.      DiskHide (CP only)
  846.      Hides disk drives from display.
  847.  
  848.  
  849.      Syntax:
  850.       DiskHide (drive-list)
  851.  
  852.      Parameters:
  853.       (s) drive-list     string of drives to hide
  854.                 (non-delimited).
  855.  
  856.      Returns:
  857.       (i)       always 1.
  858.  
  859.      This function causes the drive letters
  860.      specified in "drive-list" to be removed from
  861.      the disk drive icon display.
  862.  
  863.  
  864.      Example:
  865.       DiskHide("STUVW")
  866.  
  867.  
  868.      See Also:
  869.        DiskReset, DiskUpdate
  870.  
  871.  
  872.  
  873.  
  874.      DiskReset (CP only)
  875.      Re-examines available disk drives.
  876.  
  877.  
  878.      12
  879.  
  880.                                       WIL Update Manual
  881.  
  882.  
  883.  
  884.        Syntax:
  885.         DiskReset ( )
  886.  
  887.        Parameters:
  888.         (none)
  889.  
  890.        Returns:
  891.         (i)       always 0.
  892.  
  893.        Examines disk drives on system, and adds any
  894.        new drives found to the display of drive icons.
  895.        If an existing drive was hidden with the
  896.        DiskHide function, it will no longer be hidden
  897.        (unlike the DiskUpdate function).
  898.  
  899.  
  900.        Example:
  901.         DiskReset()
  902.  
  903.  
  904.        See Also:
  905.           DiskHide, DiskUpdate
  906.  
  907.  
  908.  
  909.  
  910.        DiskScan
  911.        Returns list of drives.
  912.  
  913.  
  914.        Syntax:
  915.         DiskScan (request#)
  916.  
  917.        Parameters:
  918.         (i) request#  see below.
  919.  
  920.        Returns:
  921.         (s)       drive list.
  922.  
  923.        Scans disk drives on the system, and returns a
  924.        space-delimited list of drives of the type
  925.        specified by request#, in the form "A: B: C: D:
  926.        ".
  927.  
  928.  
  929.  
  930.                                                      13
  931.  
  932.      WIL Update Manual
  933.  
  934.  
  935.  
  936.      The request# is a bitmask, so adding the values
  937.      together (except for 0) returns all drive types
  938.      specified; eg., a request# of 3 returns floppy
  939.      plus local hard drives.
  940.  
  941.        Req#    Return value
  942.  
  943.        0       List of unused disk IDs
  944.        1       List of floppy drives
  945.        2       List of local hard drives
  946.        4       List of remote (network) drives
  947.  
  948.  
  949.      Example:
  950.       hd = DiskScan(2)
  951.       Message("Hard drives on system", hd)
  952.  
  953.  
  954.      See Also:
  955.        DiskFree, LogDisk
  956.  
  957.  
  958.  
  959.  
  960.      DiskUpdate (CP only)
  961.      Updates drive icon display.
  962.  
  963.  
  964.      Syntax:
  965.       DiskUpdate ( )
  966.  
  967.      Parameters:
  968.       (none)
  969.  
  970.      Returns:
  971.       (i)       always 0.
  972.  
  973.      Examines disk drives on system, and adds any
  974.      new drives found to the display of drive icons.
  975.      If an existing drive was hidden with the
  976.      DiskHide function, it will remain hidden
  977.      (unlike the DiskReset function).
  978.  
  979.  
  980.  
  981.  
  982.      14
  983.  
  984.                                       WIL Update Manual
  985.  
  986.  
  987.  
  988.        Example:
  989.         DiskUpdate()
  990.  
  991.  
  992.        See Also:
  993.           DiskHide, DiskReset
  994.  
  995.  
  996.  
  997.  
  998.        DOSVersion*
  999.        Returns the version numbers of the current
  1000.        version of DOS.
  1001.  
  1002.  
  1003.        Syntax:
  1004.         DOSVersion (level)
  1005.  
  1006.        Parameters:
  1007.         (i) level @MAJOR or @MINOR.
  1008.  
  1009.        Returns:
  1010.         (i)       integer or decimal part of DOS
  1011.                   version number.
  1012.  
  1013.        @MAJOR returns the integer part (to the left of
  1014.        the decimal).
  1015.        @MINOR returns the decimal part (to the right
  1016.        of the decimal).
  1017.  
  1018.        If the version of DOS in use is 4.0, then:
  1019.  
  1020.           DOSVersion(@MAJOR)    ==   4
  1021.           DOSVersion(@MINOR)    ==   0
  1022.  
  1023.  
  1024.        Example:
  1025.         i = DOSVersion(@MAJOR)
  1026.         d = DOSVersion(@MINOR)
  1027.         If StrLen(d) == 1 Then d = StrCat("0", d)
  1028.         Message("DOS Version", "%i%.%d%")
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.                                                      15
  1035.  
  1036.      WIL Update Manual
  1037.  
  1038.  
  1039.  
  1040.      See Also:
  1041.        Environment, Version, WinVersion
  1042.  
  1043.  
  1044.  
  1045.  
  1046.      Exclusive*
  1047.      Controls whether or not other Windows programs
  1048.      will get any time to execute.
  1049.  
  1050.  
  1051.      Syntax:
  1052.       Exclusive (mode)
  1053.  
  1054.      Parameters:
  1055.       (i) mode  @ON or @OFF.
  1056.  
  1057.      Returns:
  1058.       (i)       previous Exclusive mode.
  1059.  
  1060.      Exclusive(@OFF) is the default mode.  In this
  1061.      mode,the WIL Interpreter is well-behaved toward
  1062.      other Windows applications.
  1063.  
  1064.      Exclusive(@ON) allows WIL programs to run
  1065.      somewhat faster, but causes the WIL Interpreter
  1066.      to be "greedier" about sharing processing time
  1067.      with other active Windows applications.  For
  1068.      the most part, this mode is useful only when
  1069.      you have a series of WIL statements which must
  1070.      be executed in quick succession.
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.      16
  1087.  
  1088.                                       WIL Update Manual
  1089.  
  1090.  
  1091.  
  1092.        Example:
  1093.         Exclusive(@ON)
  1094.         x = 0
  1095.         start = DateTime()
  1096.         :add
  1097.         x = x + 1
  1098.         If x < 1000 Then Goto add
  1099.         stop = DateTime()
  1100.         crlf = StrCat(Num2Char(13), Num2Char(10))
  1101.         Message("Times", "Start: %start%%crlf%Stop:
  1102.         %stop%")
  1103.         Exclusive(@OFF)
  1104.  
  1105.        See Also:
  1106.           Yield
  1107.  
  1108.  
  1109.  
  1110.  
  1111.        FileAppend*
  1112.        Appends one or more files to another file.
  1113.  
  1114.  
  1115.        Syntax:
  1116.         FileAppend (source-list, destination)
  1117.  
  1118.        Parameters:
  1119.         (s) source-list    a string containing one or
  1120.                            more filenames, which may be
  1121.                            wildcarded.
  1122.         (s) destination    target file name.
  1123.  
  1124.        Returns:
  1125.         (i)       @TRUE if all files were appended
  1126.                   successfully;
  1127.                   @FALSE if at least one file wasn't
  1128.                   appended.
  1129.  
  1130.        Use this function to append an individual file
  1131.        or a group of files to the end of an existing
  1132.        file.  If "destination" does not exist, it will
  1133.        be created.
  1134.  
  1135.  
  1136.  
  1137.  
  1138.                                                      17
  1139.  
  1140.      WIL Update Manual
  1141.  
  1142.  
  1143.  
  1144.      The file(s) specified in "source-list" will not
  1145.      be modified by this function.
  1146.  
  1147.      "Source-list" may contain * and ? wildcards.
  1148.      "Destination" may not contain wildcards of any
  1149.      type; it must be a single file name.
  1150.  
  1151.  
  1152.      Examples:
  1153.       FileAppend("c:\config.sys",
  1154.       "c:\misc\config.sav")
  1155.  
  1156.       DirChange("c:\batch")
  1157.       FileDelete("allbats.fil")
  1158.       FileAppend("*.bat", "allbats.fil")
  1159.  
  1160.  
  1161.      See Also:
  1162.        FileCopy, FileDelete, FileExist
  1163.  
  1164.  
  1165.  
  1166.  
  1167.      FileAttrGet
  1168.      Returns file attributes.
  1169.  
  1170.  
  1171.      Syntax:
  1172.       FileAttrGet (filename)
  1173.  
  1174.      Parameters:
  1175.       (s) filename  file whose attributes you want
  1176.                     to determine.
  1177.  
  1178.      Returns:
  1179.       (s)           attribute settings.
  1180.  
  1181.      Returns attributes for the specified file, in a
  1182.      string of the form "RASH".  This string is
  1183.      composed of four individual attribute
  1184.      characters, as follows:
  1185.  
  1186.        Char    Symbol    Meaning
  1187.  
  1188.  
  1189.  
  1190.      18
  1191.  
  1192.                                       WIL Update Manual
  1193.  
  1194.  
  1195.  
  1196.           1      R    Read-only ON
  1197.           2      A    Archive ON
  1198.           3      S    System ON
  1199.           4      H    Hidden ON
  1200.  
  1201.        A hyphen in any of these positions indicates
  1202.        that the specified attribute is OFF.  For
  1203.        example, the string "-A-H" indicates a file
  1204.        which has the Archive and Hidden attributes
  1205.        set.
  1206.  
  1207.  
  1208.        Example:
  1209.         editfile = "c:\config.sys"
  1210.         attr = FileAttrGet(editfile)
  1211.         If StrSub(attr, 1, 1) == "R" Then Goto
  1212.         readonly
  1213.         Run("notepad.exe", editfile)
  1214.         Exit
  1215.         :readonly
  1216.         Message("File is read-only", "Cannot edit
  1217.         %editfile%")
  1218.  
  1219.  
  1220.        See Also:
  1221.           FileAttrSet, FileTimeGet
  1222.  
  1223.  
  1224.  
  1225.  
  1226.        FileAttrSet
  1227.        Sets file attributes.
  1228.  
  1229.  
  1230.        Syntax:
  1231.         FileAttrSet (file-list, settings)
  1232.  
  1233.        Parameters:
  1234.         (s) file-list   space-delimited list of files.
  1235.         (s) settings    new attribute settings for those
  1236.                         file(s).
  1237.  
  1238.        Returns:
  1239.         (i)       always 0.
  1240.  
  1241.  
  1242.                                                      19
  1243.  
  1244.      WIL Update Manual
  1245.  
  1246.  
  1247.  
  1248.  
  1249.      The attribute string consists of one or more of
  1250.      the following characters (an upper case letter
  1251.      turns the specified attribute ON, a lower case
  1252.      letter turns it OFF):
  1253.  
  1254.        R  read only ON
  1255.        A  archive ON
  1256.        S  system ON
  1257.        H  hidden ON
  1258.  
  1259.        r  read only OFF
  1260.        a  archive OFF
  1261.        s  system OFF
  1262.        h  hidden OFF
  1263.  
  1264.  
  1265.      Examples:
  1266.       FileAttrSet("win.ini system.ini", "rAsH")
  1267.  
  1268.       FileAttrSet("c:\command.com", "R")
  1269.  
  1270.  
  1271.      See Also:
  1272.        FileAttrGet, FileTimeTouch
  1273.  
  1274.  
  1275.  
  1276.  
  1277.      FileClose*
  1278.      Closes a file.
  1279.  
  1280.  
  1281.      Syntax:
  1282.       FileClose (filehandle)
  1283.  
  1284.      Parameters:
  1285.       (i) filehandle     same integer that was
  1286.                 returned by FileOpen.
  1287.  
  1288.      Returns:
  1289.       (i)       always 0.
  1290.  
  1291.  
  1292.  
  1293.  
  1294.      20
  1295.  
  1296.                                       WIL Update Manual
  1297.  
  1298.  
  1299.  
  1300.        Example:
  1301.         ; the hard way to copy an ASCII file
  1302.         old = FileOpen("config.sys", "READ")
  1303.         new = FileOpen("sample.txt", "WRITE")
  1304.         :top
  1305.         x = FileRead(old)
  1306.         If x != "*EOF*" Then FileWrite(new, x)
  1307.         If x != "*EOF*" Then Goto top
  1308.         FileClose(new)
  1309.         FileClose(old)
  1310.  
  1311.  
  1312.        See Also:
  1313.           FileOpen, FileRead, FileWrite
  1314.  
  1315.  
  1316.  
  1317.  
  1318.        FileExtension*
  1319.        Returns extension of file.
  1320.  
  1321.  
  1322.        Syntax:
  1323.         FileExtension (filename)
  1324.  
  1325.        Parameters:
  1326.         (s) filename  [optional path] complete file
  1327.                       name, with extension.
  1328.  
  1329.        Returns:
  1330.         (s)       file extension.
  1331.  
  1332.        FileExtension parses the passed filename and
  1333.        returns the extension part of the filename.
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.                                                      21
  1347.  
  1348.      WIL Update Manual
  1349.  
  1350.  
  1351.  
  1352.      Example:
  1353.       ; prevent the user from editing a COM or EXE
  1354.       file
  1355.       allfiles = FileItemize("*.*")
  1356.       editfile = ItemSelect("Select file to edit",
  1357.       allfiles, " ")
  1358.       ext = FileExtension(editfile)
  1359.       If (ext == "com") || (ext == "exe") Then Goto
  1360.       noedit
  1361.       run("notepad.exe", editfile)
  1362.       exit
  1363.       :noedit
  1364.       Message ("Sorry", "You may not edit a program
  1365.       file")
  1366.  
  1367.  
  1368.      See Also:
  1369.        FilePath, FileRoot
  1370.  
  1371.  
  1372.  
  1373.  
  1374.      FileHilite (CP only)
  1375.      Hilites or unhilites files in file display.
  1376.  
  1377.  
  1378.      Syntax:
  1379.       FileHilite (file-masks, mode)
  1380.  
  1381.      Parameters:
  1382.       (s) file-masks     one or more file
  1383.                          specifications, which may be
  1384.                          wildcarded.
  1385.       (i) mode  @TRUE    Hilight matching files.
  1386.                 @FALSE   Unhilight matching files.
  1387.  
  1388.      Returns:
  1389.       (i)       total number of files highlighted or
  1390.                 unhilighted.
  1391.  
  1392.      This function causes one or more groups of
  1393.      files in the file display window to be
  1394.      highlighted (selected) or unhighlighted (de-
  1395.      selected).  This is useful to select files for
  1396.  
  1397.  
  1398.      22
  1399.  
  1400.                                       WIL Update Manual
  1401.  
  1402.  
  1403.  
  1404.        an operation such as FileCopy, or just to
  1405.        spotlight certain files in a directory.
  1406.  
  1407.        Multiple file specifications must be space-
  1408.        delimited.
  1409.  
  1410.  
  1411.        Examples:
  1412.         FileHilite("*.ZIP *.LZH *.ARC", @TRUE)
  1413.  
  1414.         FileHilite("OLD*.ZIP", @FALSE)
  1415.  
  1416.  
  1417.        See Also:
  1418.           CurrentFile, FileExtension
  1419.  
  1420.  
  1421.  
  1422.  
  1423.        FileOpen*
  1424.        Opens a STANDARD ASCII (only) file for reading
  1425.        or writing.
  1426.  
  1427.  
  1428.        Syntax:
  1429.         FileOpen (filename, open-type)
  1430.  
  1431.        Parameters:
  1432.         (s) filename     name of the file to open.
  1433.         (s) open-type    "READ" or "WRITE".
  1434.  
  1435.        Returns:
  1436.         (i)       filehandle
  1437.  
  1438.        The "filehandle" returned by the FileOpen
  1439.        function is subsequently used by the FileRead,
  1440.        FileWrite, and FileClose functions.
  1441.  
  1442.  
  1443.        Examples:
  1444.         ; To open for reading:
  1445.         FileOpen("stuff.txt", "READ")
  1446.  
  1447.  
  1448.  
  1449.  
  1450.                                                      23
  1451.  
  1452.      WIL Update Manual
  1453.  
  1454.  
  1455.  
  1456.       ; To open for writing:
  1457.       FileOpen("stuff.txt", "WRITE")
  1458.  
  1459.  
  1460.      See Also:
  1461.        FileClose, FileRead, FileWrite
  1462.  
  1463.  
  1464.  
  1465.  
  1466.      FilePath*
  1467.      Returns path of file.
  1468.  
  1469.  
  1470.      Syntax:
  1471.       FilePath (filename)
  1472.  
  1473.      Parameters:
  1474.       (s) filename  fully qualified file name,
  1475.                     including path.
  1476.  
  1477.      Returns:
  1478.       (s)           fully qualified path name.
  1479.  
  1480.  
  1481.      FilePath parses the passed filename and returns
  1482.      the drive and path of the file specification,
  1483.      if any.
  1484.  
  1485.      Example:
  1486.       coms = Environment("COMSPEC")
  1487.       compath = FilePath(coms)
  1488.       Message("", "Your command processor is located
  1489.       in the   %compath% directory")
  1490.  
  1491.  
  1492.      See Also:
  1493.        FileExtension, FileRoot
  1494.  
  1495.  
  1496.  
  1497.  
  1498.      FileRead*
  1499.      Reads data from a file.
  1500.  
  1501.  
  1502.      24
  1503.  
  1504.                                       WIL Update Manual
  1505.  
  1506.  
  1507.  
  1508.        Syntax:
  1509.         FileRead (filehandle)
  1510.  
  1511.        Parameters:
  1512.         (i) filehandle     same integer that was
  1513.                            returned by FileOpen.
  1514.  
  1515.        Returns:
  1516.         (s)       line of data read from file.
  1517.  
  1518.  
  1519.        When the end of the file is reached, the string
  1520.        *EOF* will be returned.
  1521.  
  1522.  
  1523.        Example:
  1524.         handle = FileOpen("autoexec.bat", "READ")
  1525.         :top
  1526.         line = FileRead(handle)
  1527.         Display(4, "AUTOEXEC DATA", line)
  1528.         If line != "*EOF*" Then Goto top
  1529.         FileClose(handle)
  1530.  
  1531.  
  1532.        See Also:
  1533.           FileClose, FileOpen, FileWrite
  1534.  
  1535.  
  1536.  
  1537.  
  1538.        FileRoot*
  1539.        Returns root of file.
  1540.  
  1541.  
  1542.        Syntax:
  1543.         FileRoot (filename)
  1544.  
  1545.        Parameters:
  1546.         (s) filename  [optional path]complete file
  1547.                       name, with extension.
  1548.  
  1549.        Returns:
  1550.         (s)           file root.
  1551.  
  1552.  
  1553.  
  1554.                                                      25
  1555.  
  1556.      WIL Update Manual
  1557.  
  1558.  
  1559.  
  1560.      FileRoot parses the passed filename and returns
  1561.      the root part of the filename.
  1562.  
  1563.  
  1564.      Example:
  1565.       allfiles = FileItemize("*.*")
  1566.       editfile = ItemSelect("Select file to edit",
  1567.       allfiles, " ")
  1568.       root = FileRoot(editfile)
  1569.       ext = FileExtension(editfile)
  1570.       lowerext = StrLower(ext)
  1571.       nicefile = StrCat(root, ".", lowerext)
  1572.       Message("", "You are about to edit
  1573.       %nicefile%.")
  1574.       Run("notepad.exe", editfile)
  1575.  
  1576.  
  1577.      See Also:
  1578.        FileExtension, FilePath
  1579.  
  1580.  
  1581.  
  1582.  
  1583.      FileTimeGet
  1584.      Returns file date and time.
  1585.  
  1586.  
  1587.      Syntax:
  1588.       FileTimeGet (filename)
  1589.  
  1590.      Parameters:
  1591.       (s) filename  name of file for which you want
  1592.                     the date and time.
  1593.  
  1594.      Returns:
  1595.       (s)           file date and time.
  1596.  
  1597.      This function will return the date and time of
  1598.      a file, in a pre-formatted string.  The format
  1599.      it is returned in depends on the date format
  1600.      specified in the [International] section of the
  1601.      WIN.INI file:
  1602.  
  1603.  
  1604.  
  1605.  
  1606.      26
  1607.  
  1608.                                       WIL Update Manual
  1609.  
  1610.  
  1611.  
  1612.        ddd mm:dd:yy hh:mm:ss XX
  1613.        ddd dd:mm:yy hh:mm:ss XX
  1614.        ddd yy:mm:dd hh:mm:ss XX
  1615.  
  1616.        Where:
  1617.           ddd is day of the week (e.g. Mon)
  1618.           mm  is the month (e.g. 10)
  1619.           dd  is the day of the month (e.g. 23)
  1620.           yy  is the year (e.g. 90)
  1621.           hh  is the hours
  1622.           mm  is the minutes
  1623.           ss  is the seconds
  1624.           XX  is the Day/Night code (e.g. AM or PM)
  1625.  
  1626.        The WIN.INI file will be examined to determine
  1627.        which format to use.  You can adjust the
  1628.        WIN.INI file via the International section of
  1629.        Control Panel if the format isn't what you
  1630.        prefer.
  1631.  
  1632.  
  1633.        Example:
  1634.         oldtime = FileTimeGet("win.ini")
  1635.         Run("notepad.exe", "win.ini")
  1636.         WinWaitClose("Notepad - WIN.INI")
  1637.         newtime = FileTimeGet("win.ini")
  1638.         If StrCmp(oldtime, newtime) == 0 Then Exit
  1639.         Message("", "WIN.INI has been changed")
  1640.  
  1641.  
  1642.        See Also:
  1643.           FileAttrGet, FileTimeTouch
  1644.  
  1645.  
  1646.  
  1647.  
  1648.        FileTimeTouch
  1649.        Sets file(s) to current time.
  1650.  
  1651.  
  1652.        Syntax:
  1653.         FileTimeTouch (file-list)
  1654.  
  1655.  
  1656.  
  1657.  
  1658.                                                      27
  1659.  
  1660.      WIL Update Manual
  1661.  
  1662.  
  1663.  
  1664.      Parameters:
  1665.       (s) file-list a space-delimited list of files
  1666.  
  1667.      Returns:
  1668.       (i)       always 0
  1669.  
  1670.      "File-list" is a space-delimited list of files,
  1671.      which may not contain wildcards.  The path is
  1672.      searched if the file is not found in current
  1673.      directory and if the directory is not specified
  1674.      in "file-list".
  1675.  
  1676.  
  1677.      Example:
  1678.       FileTimeTouch("wac.c wac.rc")
  1679.       Run("make.exe", "-fwac.mak")
  1680.  
  1681.  
  1682.      See Also:
  1683.        FileAttrSet, FileTimeGet
  1684.  
  1685.  
  1686.  
  1687.  
  1688.      FileWrite*
  1689.      Writes data to a file.
  1690.  
  1691.  
  1692.      Syntax:
  1693.       FileWrite(filehandle, output-data)
  1694.  
  1695.      Parameters:
  1696.       (i) filehandle     same integer that was
  1697.                          returned by FileOpen.
  1698.       (s) output-data    data to write to file.
  1699.  
  1700.      Returns:
  1701.       (i)       always 0.
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.      28
  1711.  
  1712.                                       WIL Update Manual
  1713.  
  1714.  
  1715.  
  1716.        Example:
  1717.         handle = FileOpen("stuff.txt", "WRITE")
  1718.         FileWrite(handle, "Gobbledygook")
  1719.         FileClose(handle)
  1720.  
  1721.  
  1722.        See Also:
  1723.           FileClose, FileOpen, FileRead
  1724.  
  1725.  
  1726.  
  1727.  
  1728.        Goto*
  1729.        Changes the flow of control in a WIL program.
  1730.  
  1731.  
  1732.        Syntax:
  1733.         Goto label
  1734.  
  1735.        Parameters:
  1736.         (s) label user-defined identifier.
  1737.  
  1738.        Goto label causes an unconditional branch to
  1739.        the line in the program marked :label, where
  1740.        the identifier is preceded by a colon (:).
  1741.  
  1742.  
  1743.        Example:
  1744.         If WinExist("Solitaire") == @FALSE Then Goto
  1745.         open
  1746.         WinActivate("Solitaire")
  1747.         Goto loaded
  1748.         :open
  1749.         Run("sol.exe", "")
  1750.         :loaded
  1751.  
  1752.  
  1753.        See Also:
  1754.           If ... Then
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.                                                      29
  1763.  
  1764.      WIL Update Manual
  1765.  
  1766.  
  1767.  
  1768.      IconArrange
  1769.      Rearranges icons.
  1770.  
  1771.  
  1772.      Syntax:
  1773.       IconArrange ( )
  1774.  
  1775.      Parameters:
  1776.       (none)
  1777.  
  1778.      Returns:
  1779.       (i)       always 0.
  1780.  
  1781.      This function rearranges the icons at the
  1782.      bottom of the screen, spacing them evenly.  It
  1783.      does not change the order in which the icons
  1784.      appear.
  1785.  
  1786.  
  1787.      Example:
  1788.       IconArrange ( )
  1789.  
  1790.  
  1791.      See Also:
  1792.        RunIcon, WinIconize, WinPlaceSet
  1793.  
  1794.  
  1795.  
  1796.  
  1797.      If...Then*
  1798.      Conditionally performs a function.
  1799.  
  1800.  
  1801.      Syntax:
  1802.       If condition Then statement
  1803.  
  1804.      Parameters:
  1805.       (s) condition    an expression to be evaluated.
  1806.       (s) statement    any valid WIL function or
  1807.                        command.
  1808.  
  1809.      If the condition following the If keyword is
  1810.      true, the statement following the Then keyword
  1811.      is executed.  If the condition following the If
  1812.  
  1813.  
  1814.      30
  1815.  
  1816.                                       WIL Update Manual
  1817.  
  1818.  
  1819.  
  1820.        keyword is false, the statement following the
  1821.        Then keyword is ignored.
  1822.  
  1823.  
  1824.        Example:
  1825.         sure = AskYesNo("End Session", "Really quit
  1826.         Windows?")
  1827.         If sure == @YES Then EndSession()
  1828.  
  1829.  
  1830.        See Also:
  1831.           Goto
  1832.  
  1833.  
  1834.  
  1835.  
  1836.        IgnoreInput*
  1837.        Turns off hardware input to windows.
  1838.  
  1839.  
  1840.        Syntax:
  1841.         IgnoreInput(mode)
  1842.  
  1843.        Parameters:
  1844.         (i) mode  @TRUE or @FALSE.
  1845.  
  1846.        Returns:
  1847.         (i)       previous IgnoreInput mode.
  1848.  
  1849.  
  1850.        IgnoreInput causes mouse movements, clicks and
  1851.        keyboard entry to be completely ignored.  Good
  1852.        for self-running demos.
  1853.  
  1854.        Warning: If you are not careful with the use of
  1855.        IgnoreInput, you can lock up your computer!
  1856.  
  1857.  
  1858.        Example:
  1859.         username = AskLine("Hello", "Please enter your
  1860.         name","")
  1861.         IgnoreInput(@TRUE)
  1862.         Call("demo.wbt", username)
  1863.         IgnoreInput(@FALSE)
  1864.  
  1865.  
  1866.                                                      31
  1867.  
  1868.      WIL Update Manual
  1869.  
  1870.  
  1871.  
  1872.      IniDelete
  1873.      Removes a line or section from WIN.INI.
  1874.  
  1875.  
  1876.      Syntax:
  1877.       IniDelete (section, keyname)
  1878.  
  1879.      Parameters:
  1880.       (s) section   the major heading under which
  1881.                     the item is located.
  1882.       (s) keyname   the name of the item to delete.
  1883.  
  1884.      Returns:
  1885.       (i)       always 0
  1886.  
  1887.      This function will remove the specified line
  1888.      from the specified section in WIN.INI.  You can
  1889.      remove an entire section, instead of just a
  1890.      single line, by specifying a keyword of
  1891.      @WHOLESECTION.  Case is not significant in
  1892.      section or keyname.
  1893.  
  1894.  
  1895.      Examples:
  1896.       IniDelete("Desktop", "Wallpaper")
  1897.  
  1898.       IniDelete("Quicken",@WHOLESECTION)
  1899.  
  1900.  
  1901.      See Also:
  1902.        IniDeletePvt, IniItemize, IniRead, IniWrite
  1903.  
  1904.  
  1905.  
  1906.  
  1907.      IniDeletePvt
  1908.      Removes a line or section from a private INI
  1909.      file.
  1910.  
  1911.  
  1912.      Syntax:
  1913.       IniDeletePvt (section, keyname, filename)
  1914.  
  1915.  
  1916.  
  1917.  
  1918.      32
  1919.  
  1920.                                       WIL Update Manual
  1921.  
  1922.  
  1923.  
  1924.        Parameters:
  1925.         (s) section   the major heading under which
  1926.                       the item is located.
  1927.         (s) keyname   the name of the item to delete.
  1928.         (s) filename  name of the INI file.
  1929.  
  1930.        Returns:
  1931.         (i)       always 0.
  1932.  
  1933.        This function will remove the specified line
  1934.        from the specified section in a private INI
  1935.        file.  You can remove an entire section,
  1936.        instead of just a single line, by specifying a
  1937.        keyword of @WHOLESECTION.  Case is not
  1938.        significant in section or keyname.
  1939.  
  1940.  
  1941.        Example:
  1942.         IniDeletePvt("Current Users", "Excel",
  1943.         "meter.ini")
  1944.  
  1945.  
  1946.        See Also:
  1947.           IniDelete, IniItemizePvt, IniReadPvt,
  1948.           IniWritePvt
  1949.  
  1950.  
  1951.  
  1952.  
  1953.        IniItemize
  1954.        Lists keywords or sections in WIN.INI.
  1955.  
  1956.  
  1957.        Syntax:
  1958.         IniItemize (section)
  1959.  
  1960.        Parameters:
  1961.         (s) section   the major heading to itemize.
  1962.  
  1963.        Returns:
  1964.         (s)           list of keywords or sections.
  1965.  
  1966.        IniItemize will scan the specified section in
  1967.        WIN.INI, and return a space-delimited list of
  1968.  
  1969.  
  1970.                                                      33
  1971.  
  1972.      WIL Update Manual
  1973.  
  1974.  
  1975.  
  1976.      all keyword names contained within that
  1977.      section.  If a null string ("") is given as the
  1978.      section name, IniItemize will return a list of
  1979.      all section names contained within WIN.INI.
  1980.      Case is not significant in section names.
  1981.  
  1982.  
  1983.      Examples:
  1984.       ; Returns all keywords in the [Extensions]
  1985.       section
  1986.       keywords = IniItemize("Extensions")
  1987.  
  1988.       ; Returns all sections in the entire WIN.INI
  1989.       file
  1990.       sections = IniItemize("")
  1991.  
  1992.  
  1993.      See Also:
  1994.        IniDelete, IniItemizePvt, IniRead, IniWrite
  1995.  
  1996.  
  1997.  
  1998.  
  1999.      IniItemizePvt
  2000.      Lists keywords or sections in a private INI
  2001.      file.
  2002.  
  2003.  
  2004.      Syntax:
  2005.       IniItemizePvt (section, filename)
  2006.  
  2007.      Parameters:
  2008.       (s) section   the major heading to itemize.
  2009.       (s) filename  name of the INI file.
  2010.  
  2011.      Returns:
  2012.       (s)       list of keywords or sections.
  2013.  
  2014.      IniItemizePvt will scan the specified section
  2015.      in a private INI file, and return a space-
  2016.      delimited list of all keyword names contained
  2017.      within that section.  If a null string ("") is
  2018.      given as the section name, IniItemizePvt will
  2019.      return a list of all section names contained
  2020.  
  2021.  
  2022.      34
  2023.  
  2024.                                       WIL Update Manual
  2025.  
  2026.  
  2027.  
  2028.        within the file.  Case is not significant in
  2029.        section names.
  2030.  
  2031.  
  2032.        Example:
  2033.         ; Returns all keywords in the [Boot] section
  2034.         of SYSTEM.INI
  2035.         keywords = IniItemizePvt("Boot", "system.ini")
  2036.  
  2037.  
  2038.        See Also:
  2039.           IniDeletePvt, IniItemize, IniReadPvt,
  2040.           IniWritePvt
  2041.  
  2042.  
  2043.  
  2044.  
  2045.        IniReadPvt*
  2046.        Reads data from a private INI file.
  2047.  
  2048.  
  2049.        Syntax:
  2050.         IniReadPvt (section, keyname, default,
  2051.                   filename)
  2052.  
  2053.        Parameters:
  2054.         (s) section   the major heading to read the
  2055.                       data from.
  2056.         (s) keyname   the name of the item to read.
  2057.         (s) default   string to return if the desired
  2058.                       item is not found.
  2059.         (s) filename  name of the INI file.
  2060.  
  2061.        Returns:
  2062.         (s)           data from the INI file.
  2063.  
  2064.        Looks up a value in the "filename".INI file.
  2065.        If the value is not found, the "default" will
  2066.        be returned.
  2067.  
  2068.  
  2069.        Example:
  2070.         IniReadPvt("Main", "Lang", "English",
  2071.         "WB.INI")
  2072.  
  2073.  
  2074.                                                      35
  2075.  
  2076.      WIL Update Manual
  2077.  
  2078.  
  2079.  
  2080.  
  2081.      Given the following segment from WB.INI:
  2082.  
  2083.        [Main]
  2084.        Lang=French
  2085.  
  2086.      The statement above would return:
  2087.  
  2088.        French
  2089.  
  2090.  
  2091.      See Also:
  2092.        IniDeletePvt, IniItemizePvt, IniRead,
  2093.        IniWritePvt
  2094.  
  2095.  
  2096.  
  2097.  
  2098.      IniWritePvt*
  2099.      Writes data to a private INI file.
  2100.  
  2101.  
  2102.      Syntax:
  2103.       IniWritePvt (section, keyname, data, filename)
  2104.  
  2105.      Parameters:
  2106.       (s) section   major heading to write the data
  2107.                     to.
  2108.       (s) keyname   name of the data item to write.
  2109.       (s) data      string to write to the INI file.
  2110.       (s) filename  name of the INI file.
  2111.  
  2112.      Returns:
  2113.       (i)       always 1.
  2114.  
  2115.  
  2116.      Writes a value in the "filename".INI file.
  2117.  
  2118.  
  2119.      Example:
  2120.       IniWritePvt("Main", "Lang", "French, "WB.INI")
  2121.  
  2122.      This would create the following entry in
  2123.      WB.INI:
  2124.  
  2125.  
  2126.      36
  2127.  
  2128.                                       WIL Update Manual
  2129.  
  2130.  
  2131.  
  2132.           [Main]
  2133.           Lang=French
  2134.  
  2135.  
  2136.        See Also:
  2137.           IniDeletePvt, IniItemizePvt, IniReadPvt,
  2138.           IniWrite
  2139.  
  2140.  
  2141.  
  2142.  
  2143.        IntControl
  2144.        Internal control functions.
  2145.  
  2146.  
  2147.        Syntax:
  2148.         IntControl (request#, p1, p2, p3, p4)
  2149.  
  2150.        Parameters:
  2151.         (i) request#  specifies which sub-function is
  2152.                       to be performed (see below).
  2153.         (s) p1 - p4   parameters which may be required
  2154.                       by the function (see below).
  2155.  
  2156.        Returns:
  2157.         (s)       varies (see below).
  2158.  
  2159.        Short for Internal Control, a special function
  2160.        that permits numerous internal operations in
  2161.        the CP and WB products.  The first parameter of
  2162.        IntControl defines exactly what the function
  2163.        does, the other parameters are possible
  2164.        arguments to the function.
  2165.  
  2166.        Warning: Many of these operations are useful
  2167.        only under special circumstances, and/or by
  2168.        technically knowledgeable users.  Some could
  2169.        lead to adverse side effects.  If it isn't
  2170.        clear to you what a particular function does,
  2171.        don't use it.
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.                                                      37
  2179.  
  2180.      WIL Update Manual
  2181.  
  2182.  
  2183.  
  2184.      IntControl (1, p1, 0, 0, 0)
  2185.      Just a test IntControl.  It echoes back P1 & P2
  2186.      and P3 & P4 in a pair of message boxes.
  2187.  
  2188.  
  2189.      IntControl (2, 0, 0, 0, 0) (CP only)
  2190.      Returns the number of Command Post windows
  2191.      currently open.
  2192.  
  2193.  
  2194.      IntControl (3, 0, 0, 0, 0) (CP only)
  2195.      Writes the positions of each open Command Post
  2196.      window to the WWW-PROD.INI file, using the
  2197.      WinPositionXY format.
  2198.  
  2199.  
  2200.      IntControl (4, p1, 0, 0, 0)
  2201.      Controls whether or not a dialog box with a
  2202.      file listbox in it has to return a file name,
  2203.      or may return merely a directory name or
  2204.      nothing.
  2205.  
  2206.        P1   Meaning
  2207.  
  2208.        0    May return nothing, or just a directory
  2209.             name
  2210.        1    Must return a file name (default)
  2211.  
  2212.  
  2213.      IntControl (5, p1, 0, 0, 0)
  2214.      Controls whether system & hidden files are seen
  2215.      and processed.
  2216.  
  2217.        P1   Meaning
  2218.  
  2219.        0    System & Hidden files not used (default)
  2220.        1    System & Hidden files seen and used
  2221.  
  2222.  
  2223.      IntControl (6, 0, 0, 0, 0) (CP only)
  2224.      Positions all open Command Post windows, based
  2225.      on the information in the WWW-PROD.INI file.
  2226.  
  2227.  
  2228.  
  2229.  
  2230.      38
  2231.  
  2232.                                       WIL Update Manual
  2233.  
  2234.  
  2235.  
  2236.        IntControl (8, 0, 0, 0, 0) (CP only)
  2237.        Reloads Command Post menus, just like selecting
  2238.        "Reload Menu" from the system menu.
  2239.  
  2240.  
  2241.        IntControl (9, p1, 0, 0, 0) (CP only)
  2242.        Controls Command Post window resizing.
  2243.  
  2244.           P1   Meaning
  2245.  
  2246.           0    Resize automagically on open and close
  2247.               (default)
  2248.           1    disable resize on window close
  2249.           2    disable resize on window open
  2250.           3    disable resize on open and close
  2251.  
  2252.  
  2253.        IntControl (10, p1, 0, 0, 0)
  2254.        Interrogates the Command Extender DLL status
  2255.  
  2256.           P1   Meaning
  2257.  
  2258.           0    Command Extender present
  2259.                0         No
  2260.                1         Yes
  2261.  
  2262.           1    Command Extender version
  2263.                -1        No Extender present
  2264.                 0        Incompatible extender present
  2265.                 (other)  Extender version code
  2266.  
  2267.           2    Interpreter's Extender interface code
  2268.  
  2269.           3    Name of Extender DLL
  2270.  
  2271.  
  2272.        IntControl (11, p1, 0, 0, 0) (CP only)
  2273.        Used to tell Command Post that it is (or is
  2274.        not) a shell, contrary to what it really is.
  2275.        That is, if it is really a shell, you can
  2276.        disable the shell-like characteristics, or if
  2277.        it is not a shell, enable its shell
  2278.        characteristics.
  2279.  
  2280.  
  2281.  
  2282.                                                      39
  2283.  
  2284.      WIL Update Manual
  2285.  
  2286.  
  2287.  
  2288.        P1   Meaning
  2289.  
  2290.        0    Play standard app
  2291.        1    Play shell
  2292.  
  2293.  
  2294.      IntControl (12, p1, 0, 0, 0) (WB only)
  2295.      Used to direct WinBatch to allow itself to be
  2296.      terminated without warning when Windows shuts
  2297.      down and a batch file is still running
  2298.  
  2299.        P1   Meaning
  2300.  
  2301.        0    WinBatch complains on shutdown (default)
  2302.        1    WinBatch will terminate quietly
  2303.  
  2304.  
  2305.      IntControl (15, 0, 0, 0, 0) (WB only)
  2306.      Returns currently executing WBT file name; the
  2307.      same as the "paramfile" variable.
  2308.  
  2309.  
  2310.      IntControl (18, 0, 0, 0, 0)
  2311.      Suspends the program (WB or CP) waiting for
  2312.      some other process to do the equivalent of
  2313.      IntControl(19).  This command will hang your
  2314.      system if used improperly.
  2315.  
  2316.  
  2317.      IntControl (19, p1, 0, 0, 0)
  2318.      Un-suspends a process stopped with
  2319.      IntControl(18).  P1 is a window handle (not a
  2320.      window title).  Windows handles may be derived
  2321.      from window titles using IntControl(21).
  2322.  
  2323.  
  2324.      IntControl (20, 0, 0, 0, 0)
  2325.      Returns window handle of current Command Post
  2326.      or WinBatch window.
  2327.  
  2328.  
  2329.      IntControl (21, p1, 0, 0, 0)
  2330.      Returns window handle of window matching the
  2331.      partial window-name in p1.
  2332.  
  2333.  
  2334.      40
  2335.  
  2336.                                       WIL Update Manual
  2337.  
  2338.  
  2339.  
  2340.        IntControl (22, p1, p2, p3, p4)
  2341.        Issues a Windows "SendMessage".
  2342.  
  2343.           p1   Window handle to send to
  2344.           p2   Message ID number (in decimal)
  2345.           p3   wParam value
  2346.           p4   assumed to be a character string.
  2347.           String is copied to a GMEM_LOWER buffer, and
  2348.           a LPSTR to the copied string is passed    as
  2349.           lParam. The GMEM_LOWER buffer is freed
  2350.           immediately upon return from the SendMessage
  2351.  
  2352.  
  2353.        IntControl (23, 0, 0, 0, 0)
  2354.        Issues a windows PostMessage
  2355.  
  2356.           p1   Window handle
  2357.           p2   Message ID number (in decimal)
  2358.           p3   wParam
  2359.           p4   lParam -- assumed to be numeric
  2360.  
  2361.  
  2362.        IntControl (66, 0, 0, 0, 0)
  2363.        Restarts Windows, just like exiting to DOS and
  2364.        typing WIN again.  Could be used to restart
  2365.        Windows after editing the SYSTEM.INI file to
  2366.        change video modes.
  2367.  
  2368.  
  2369.        IntControl (67, 0, 0, 0, 0)
  2370.        Performs a warm boot of the system, just like
  2371.        <Ctrl-Alt-Del>.  Could be used to reboot the
  2372.        system after editing the AUTOEXEC.BAT or
  2373.        CONFIG.SYS files.
  2374.  
  2375.        Note: IntControl(67) works only in Windows 3.1
  2376.        or higher.  In Windows 3.0, it behaves just
  2377.        like IntControl(66) and restarts Windows.
  2378.  
  2379.  
  2380.  
  2381.  
  2382.        IsKeyDown*
  2383.        Tells about keys/mouse.
  2384.  
  2385.  
  2386.                                                      41
  2387.  
  2388.      WIL Update Manual
  2389.  
  2390.  
  2391.  
  2392.      Syntax:
  2393.       IsKeyDown(keycodes)
  2394.  
  2395.      Parameters:
  2396.       (i) keycodes  @SHIFT and/or @CTRL.
  2397.  
  2398.      Returns:
  2399.       (i)       @YES if the key is down.
  2400.                 @NO if the key is not down.
  2401.  
  2402.  
  2403.      Determines if the Shift key or the Ctrl key is
  2404.      currently down.
  2405.  
  2406.      Note: The right mouse button is the same as
  2407.      Shift, and the middle mouse button is the same
  2408.      as Ctrl.
  2409.  
  2410.  
  2411.      Examples:
  2412.       IsKeyDown(@SHIFT)
  2413.  
  2414.       IsKeyDown(@CTRL)
  2415.  
  2416.       IsKeyDown(@CTRL | @SHIFT)
  2417.  
  2418.       IsKeyDown(@CTRL & @SHIFT)
  2419.  
  2420.      See Also:
  2421.        WaitForKey
  2422.  
  2423.  
  2424.  
  2425.  
  2426.      IsLicensed*
  2427.      Tells if the WIL Interpreter is licensed.
  2428.  
  2429.  
  2430.      Syntax:
  2431.       IsLicensed ( )
  2432.  
  2433.      Parameters:
  2434.       (none)
  2435.  
  2436.  
  2437.  
  2438.      42
  2439.  
  2440.                                       WIL Update Manual
  2441.  
  2442.  
  2443.  
  2444.        Returns:
  2445.         (i)       @YES if current version of the WIL
  2446.                   Interpreter is licensed.
  2447.                   @NO if current version of the WIL
  2448.                   Interpreter is not licensed.
  2449.  
  2450.  
  2451.        Returns information on whether or not the
  2452.        current version of the WIL Interpreter is a
  2453.        licensed copy.
  2454.  
  2455.  
  2456.        Example:
  2457.         IsLicensed()
  2458.  
  2459.        See Also:
  2460.           Version
  2461.  
  2462.  
  2463.  
  2464.  
  2465.        ItemCount*
  2466.        Returns the number of items in a list.
  2467.  
  2468.  
  2469.        Syntax:
  2470.         ItemCount (list, delimiter)
  2471.  
  2472.        Parameters:
  2473.         (s) list  a string containing a list of items
  2474.                   to choose from.
  2475.         (s) delimiter a string containing the
  2476.                   character to act as delimiter
  2477.                   between items in the list.
  2478.  
  2479.        Returns:
  2480.         (i)       the number of items in the list.
  2481.  
  2482.        If you create the list with the FileItemize or
  2483.        DirItemize functions you will be using a space-
  2484.        delimited list.  WinItemize, however, creates a
  2485.        tab-delimited list of window titles since
  2486.        titles can have embedded blanks.
  2487.  
  2488.  
  2489.  
  2490.                                                      43
  2491.  
  2492.      WIL Update Manual
  2493.  
  2494.  
  2495.  
  2496.      Example:
  2497.       a = FileItemize("*.*")
  2498.       n = ItemCount(a, " ")
  2499.       Message("Note", "There are %n% files")
  2500.  
  2501.  
  2502.      See Also:
  2503.        DirItemize, FileItemize, WinItemize,
  2504.        ItemExtract, ItemSelect
  2505.  
  2506.  
  2507.  
  2508.  
  2509.      ItemExtract*
  2510.      Returns the selected item from a list.
  2511.  
  2512.  
  2513.      Syntax:
  2514.       ItemExtract (select, list, delimiter)
  2515.  
  2516.      Parameters:
  2517.       (i) select    the position in "list" of the
  2518.                 item to be selected.
  2519.       (s) list  a string containing a list of items
  2520.                 to choose from.
  2521.       (s) delimiter a string containing the
  2522.                 character to act as delimiter
  2523.                 between items in the list.
  2524.  
  2525.      Returns:
  2526.       (s)       the selected item.
  2527.  
  2528.      If you create the list with the FileItemize or
  2529.      DirItemize functions you will be using a space-
  2530.      delimited list.  WinItemize, however, creates a
  2531.      tab-delimited list of window titles since
  2532.      titles can have embedded blanks.
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.      44
  2543.  
  2544.                                       WIL Update Manual
  2545.  
  2546.  
  2547.  
  2548.        Example:
  2549.         bmpfiles = FileItemize("*.bmp")
  2550.         bmpcount = ItemCount(bmpfiles, " ")
  2551.         pos = (Random(bmpcount - 1)) + 1
  2552.         paper = ItemExtract(pos, bmpfiles, " ")
  2553.         Wallpaper(paper, @FALSE)
  2554.  
  2555.  
  2556.        See Also:
  2557.           DirItemize, FileItemize, WinItemize,
  2558.           ItemCount, ItemSelect
  2559.  
  2560.  
  2561.  
  2562.  
  2563.        MouseInfo
  2564.        Returns assorted mouse information.
  2565.  
  2566.  
  2567.        Syntax:
  2568.         MouseInfo (request#)
  2569.  
  2570.        Parameters:
  2571.         (i) request#  see below.
  2572.  
  2573.        Returns:
  2574.         (s)           see below.
  2575.  
  2576.        The information returned by MouseInfo depends
  2577.        on the value of request#.
  2578.  
  2579.           Req# Return value
  2580.  
  2581.           0    Window name under mouse
  2582.           1    Top level parent window name under mouse
  2583.           2    Mouse coordinates, assuming a 1000x1000
  2584.                virtual screen
  2585.           3    Mouse coordinates in absolute numbers
  2586.           4    Status of mouse buttons, as a bitmask:
  2587.  
  2588.                  BinaryDecimal  Meaning
  2589.  
  2590.                  000   0      No buttons down
  2591.                  001   1      Right button down
  2592.  
  2593.  
  2594.                                                      45
  2595.  
  2596.      WIL Update Manual
  2597.  
  2598.  
  2599.  
  2600.                010   2     Middle button down
  2601.                011   3     Right and Middle buttons
  2602.                            down
  2603.                100   4     Left button down
  2604.                101   5     Left and Right buttons
  2605.                            down
  2606.                110   6     Left and Middle buttons
  2607.                            down
  2608.                111   7     Left, Middle, and Right
  2609.                            buttons down
  2610.  
  2611.      For example, if mouse is at the center of a
  2612.      640x480 screen and above the "Clock" window,
  2613.      and the left button is down, the following
  2614.      values would be returned:
  2615.  
  2616.        Req# Return value
  2617.  
  2618.        1    "Clock"
  2619.        2    "500 500"
  2620.        3    "320 240"
  2621.        4    "4"
  2622.  
  2623.  
  2624.      Example:
  2625.       Display(1, "", "Press a mouse button to
  2626.                       continue")
  2627.       :loop
  2628.       buttons = MouseInfo(4)
  2629.       If buttons == 0 Then Goto loop
  2630.       If buttons & 4 Then Display(1, "", "Left
  2631.       button was pressed")
  2632.       If buttons & 1 Then Display(1, "", "Right
  2633.       button was pressed")
  2634.  
  2635.  
  2636.      See Also:
  2637.        WinMetrics, WinParmGet
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.      46
  2647.  
  2648.                                       WIL Update Manual
  2649.  
  2650.  
  2651.  
  2652.        NetAddCon
  2653.        Connects network resources to imaginary local
  2654.        disk drives or printer ports.
  2655.  
  2656.  
  2657.        Syntax:
  2658.         NetAddCon (net-path, password, local-name)
  2659.  
  2660.        Parameters:
  2661.         (s) net-path     net resource or string returned
  2662.                          by NetBrowse.
  2663.         (s) password     password required to access
  2664.                          resource, or "".
  2665.         (s) local-name   local drive name or printer
  2666.                          port.
  2667.  
  2668.        Returns:
  2669.         (i)       @TRUE if successful; @FALSE if
  2670.                   unsuccessful.
  2671.  
  2672.        You can use NetAddCon to connect a local drive
  2673.        to a network directory, in which case "local-
  2674.        name" will be a drive name (eg, "Z:").  You can
  2675.        also connect a local printer port to a network
  2676.        print queue, in which case "local-name" will be
  2677.        the name of the printer port (eg, "LPT1").
  2678.  
  2679.        Use the NetBrowse function to obtain a value
  2680.        for "net-path".
  2681.  
  2682.        If no password is required, use a null string
  2683.        ("") for the "password" parameter.
  2684.  
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690.  
  2691.  
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.                                                      47
  2699.  
  2700.      WIL Update Manual
  2701.  
  2702.  
  2703.  
  2704.      Example:
  2705.       availdrive = DiskScan(0)
  2706.       drvlen = StrLen(availdrive)
  2707.       If drvlen == 0 Then Goto nomore
  2708.       availdrive = StrSub(availdrive, drvlen - 2, 2)
  2709.       netpath = NetBrowse(0)
  2710.       pswd = AskPassword("Enter password for",
  2711.       netpath)
  2712.       NetAddCon(netPath, pswd, availdrive)
  2713.       Exit
  2714.       :nomore
  2715.       Message("Connect Drive to Net", "No drives
  2716.       avail for assignment")
  2717.  
  2718.  
  2719.      See Also:
  2720.        NetBrowse, NetCancelCon, NetGetCon
  2721.  
  2722.  
  2723.  
  2724.  
  2725.      NetBrowse
  2726.      Displays a dialog box allowing the user to
  2727.      select a network resource.
  2728.  
  2729.  
  2730.      Syntax:
  2731.       NetBrowse (request#)
  2732.  
  2733.      Parameters:
  2734.       (i) request#  see below.
  2735.  
  2736.      Returns:
  2737.       (s)       see below.
  2738.  
  2739.      Displays a dialog box allowing the user to
  2740.      select a network resource. Request#=0 allows
  2741.      selection of a network directory and
  2742.      Request#=1 allows selection of a print queue.
  2743.      This function returns a string that can be used by
  2744.      NetAddCon to add a connection.
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750.      48
  2751.  
  2752.                                       WIL Update Manual
  2753.  
  2754.  
  2755.  
  2756.        Example:
  2757.         availdrive = DiskScan(0)
  2758.         drvlen = StrLen(availdrive)
  2759.         If drvlen == 0 Then Goto nomore
  2760.         availdrive = StrSub(availdrive, drvlen - 2, 2)
  2761.         netpath = NetBrowse(0)
  2762.         pswd = AskPassword("Enter password for",
  2763.         netpath)
  2764.         NetAddCon(netPath, pswd, availdrive)
  2765.         Exit
  2766.         :nomore
  2767.         Message("Connect Drive to Net", "No drives
  2768.         avail for assignment")
  2769.  
  2770.  
  2771.        See Also:
  2772.           NetAddCon
  2773.  
  2774.  
  2775.  
  2776.  
  2777.        NetCancelCon
  2778.        Breaks a network connection.
  2779.  
  2780.  
  2781.        Syntax:
  2782.         NetCancelCon (name, force)
  2783.  
  2784.        Parameters:
  2785.         (s) name     network resource name or local name.
  2786.         (i) force    force flag (see below).
  2787.  
  2788.        Returns:
  2789.         (i)       @TRUE if successful; @FALSE if
  2790.                   unsuccessful.
  2791.  
  2792.        If "force" is set to 0, NetCancelCon will not
  2793.        break the connection if any files on that
  2794.        connection are still open.  If "force" is set
  2795.        to 1, the connection will be broken regardless.
  2796.  
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.                                                      49
  2803.  
  2804.      WIL Update Manual
  2805.  
  2806.  
  2807.  
  2808.      Example:
  2809.       availdrive = DiskScan(4)
  2810.       n = ItemCount(availdrive, " ")
  2811.       If n == 0 Then Exit
  2812.       i = 1
  2813.       dislist = ""
  2814.       :loop
  2815.       drv = ItemExtract(i, availdrive, " ")
  2816.       dislist = StrCat(drv, Num2Char(9),
  2817.       NetGetCon(drv), "|")
  2818.       i = i + 1
  2819.       If i < n Then Goto loop
  2820.       availdrive = ItemSelect("Disconnect", dislist,
  2821.       "|")
  2822.       NetCancelCon(availdrive, 0)
  2823.  
  2824.  
  2825.      See Also:
  2826.        NetAddCon, NetGetCon
  2827.  
  2828.  
  2829.  
  2830.  
  2831.      NetDialog
  2832.      Brings up the network driver's dialog box.
  2833.  
  2834.  
  2835.      Syntax:
  2836.       NetDialog ( )
  2837.  
  2838.      Parameters:
  2839.       (none)
  2840.  
  2841.      Returns:
  2842.       (i)       @TRUE if successful; @FALSE if
  2843.                 unsuccessful.
  2844.  
  2845.      A network driver's dialog box displays
  2846.      copyright information, and may allow access to
  2847.      the network, depending on the particular
  2848.      network driver.  The WIL program will wait
  2849.      until the network dialog terminates before
  2850.      continuing.
  2851.  
  2852.  
  2853.  
  2854.      50
  2855.  
  2856.                                       WIL Update Manual
  2857.  
  2858.  
  2859.  
  2860.        Example:
  2861.         NetDialog()
  2862.         DiskUpdate()
  2863.  
  2864.  
  2865.        See Also:
  2866.           DiskReset, DiskUpdate
  2867.  
  2868.  
  2869.  
  2870.  
  2871.        NetGetCaps
  2872.        Returns information on network capabilities.
  2873.  
  2874.  
  2875.        Syntax:
  2876.         NetGetCaps (request#)
  2877.  
  2878.        Parameters:
  2879.         (i) request#  see below.
  2880.  
  2881.        Returns:
  2882.         (i)       see below.
  2883.  
  2884.        NetGetCaps returns 0 if no network is installed
  2885.        (it is the only network function you can use
  2886.        without having a network installed and not get
  2887.        an error).
  2888.  
  2889.           Req# Return value
  2890.  
  2891.           1    Network driver specification number
  2892.  
  2893.           2    Type of network installed:
  2894.                0        None
  2895.                256      MS Network
  2896.                512      Lan Manager
  2897.                768      Novell NetWare
  2898.                1024     Banyan Vines
  2899.                1280     10 Net
  2900.                (other)  Other network
  2901.  
  2902.           3    Network driver version number
  2903.  
  2904.  
  2905.  
  2906.                                                      51
  2907.  
  2908.      WIL Update Manual
  2909.  
  2910.  
  2911.  
  2912.        4    Returns 1 if any network is installed
  2913.  
  2914.        6    Bitmask indicating whether the network
  2915.             driver supports the following
  2916.             connect functions:
  2917.             1    AddConnection
  2918.             2    CancelConnection
  2919.             4    GetConnection
  2920.             8    AutoConnect via DOS
  2921.             16   BrowseDialog
  2922.  
  2923.        7    Bitmask indicating whether the network
  2924.             driver supports the following
  2925.             print functions:
  2926.             2    Open Print Job
  2927.             4    Close Print Job
  2928.             16   Hold Print Job
  2929.             32   Release Print Job
  2930.             64   Cancel Print Job
  2931.             128  Set number of copies
  2932.             256  Watch Print Queue
  2933.             512  Unwatch Print Queue
  2934.             1024 Lock Queue Data
  2935.             2048 Unlock Queue Data
  2936.             4096 Driver will send QueueChanged
  2937.                  messages to Print Manager
  2938.             8192 Abort Print Job
  2939.  
  2940.  
  2941.      Example:
  2942.       caps = NetGetCaps(6)
  2943.       If caps & 16 Then Message("", "Your network
  2944.       supports BrowseDialog")
  2945.  
  2946.      See Also:
  2947.        NetGetUser, WinConfig, WinMetrics, WinParmGet
  2948.  
  2949.  
  2950.  
  2951.  
  2952.      NetGetCon
  2953.      Returns the name of a connected network
  2954.      resource.
  2955.  
  2956.  
  2957.  
  2958.      52
  2959.  
  2960.                                       WIL Update Manual
  2961.  
  2962.  
  2963.  
  2964.        Syntax:
  2965.         NetGetCon (local-name)
  2966.  
  2967.        Parameters:
  2968.         (s) local-name     local drive name or printer
  2969.                   port.
  2970.  
  2971.        Returns:
  2972.         (s)       name of network resource.
  2973.  
  2974.        NetGetCon returns the name of the network
  2975.        resource currently connected to "local-name".
  2976.  
  2977.  
  2978.        Example:
  2979.         local = AskLine("NetGetCon", "Enter local
  2980.         drive name", "")
  2981.         If local == "" Then Exit
  2982.         resource = NetGetCon(local)
  2983.         Message("NetGetCon", "%local% is connected to
  2984.         %resource%")
  2985.  
  2986.  
  2987.        See Also:
  2988.           NetAddCon, NetCancelCon
  2989.  
  2990.  
  2991.  
  2992.  
  2993.        NetGetUser
  2994.        Returns the name of the user currently logged
  2995.        into the network.
  2996.  
  2997.  
  2998.        Syntax:
  2999.         NetGetUser ( )
  3000.  
  3001.        Parameters:
  3002.         (none)
  3003.  
  3004.        Returns:
  3005.         (s)       name of current user.
  3006.  
  3007.  
  3008.  
  3009.  
  3010.                                                      53
  3011.  
  3012.      WIL Update Manual
  3013.  
  3014.  
  3015.  
  3016.      Example:
  3017.       IniWritePvt("Current Users", "Excel",
  3018.       NetGetUser(), "usagelog.ini")
  3019.       Run("excel.exe", "")
  3020.  
  3021.  
  3022.      See Also:
  3023.        NetGetCaps
  3024.  
  3025.  
  3026.  
  3027.  
  3028.      ParseData*
  3029.      Parses the passed string.
  3030.  
  3031.  
  3032.      Syntax:
  3033.       ParseData (string)
  3034.  
  3035.      Parameters:
  3036.       (s) string    string to be parsed.
  3037.  
  3038.      Returns:
  3039.       (i)           number of parameters in "string".
  3040.  
  3041.      This function breaks a string constant or
  3042.      string variable into new sub-string variables
  3043.      named param1, param2, etc. (maximum of nine
  3044.      parameters).  Blank spaces in the original
  3045.      string are used as delimiters to create the new
  3046.      variables.
  3047.  
  3048.      Param0 is the count of how many sub-strings are
  3049.      found in "string".
  3050.  
  3051.  
  3052.      Example:
  3053.       username = AskLine("Hello", "Please enter your
  3054.                           name","")
  3055.       ParseData(username)
  3056.  
  3057.      If the user enters:
  3058.  
  3059.        Joe Q. User
  3060.  
  3061.  
  3062.      54
  3063.  
  3064.                                       WIL Update Manual
  3065.  
  3066.  
  3067.  
  3068.        ParseData would create the following variables:
  3069.  
  3070.           param1 ==   Joe
  3071.           param2 ==   Q.
  3072.           param3 ==   User
  3073.           param0 ==   3
  3074.  
  3075.  
  3076.        See Also:
  3077.           ItemExtract, StrSub
  3078.  
  3079.  
  3080.  
  3081.  
  3082.        PlayMedia
  3083.        Controls multimedia devices.
  3084.  
  3085.  
  3086.        Syntax:
  3087.         PlayMedia (command-string)
  3088.  
  3089.        Parameters:
  3090.         (s) command-string   string to be sent to the
  3091.                              multimedia device.
  3092.  
  3093.        Returns:
  3094.         (s)                  response from the device.
  3095.  
  3096.        If the appropriate Windows multimedia
  3097.        extensions are present, this function can
  3098.        control multimedia devices.  Valid command
  3099.        strings depend on the multimedia devices and
  3100.        drivers installed.  The basic Windows
  3101.        multimedia package has a waveform device to
  3102.        play and record waveforms, and a sequencer
  3103.        device to play MID files.  Refer to the
  3104.        appropriate documentation for information on
  3105.        command strings.
  3106.  
  3107.        Many multimedia devices accept the WAIT or
  3108.        NOTIFY parameters as part of the command
  3109.        string:
  3110.  
  3111.  
  3112.  
  3113.  
  3114.                                                      55
  3115.  
  3116.      WIL Update Manual
  3117.  
  3118.  
  3119.  
  3120.        WAIT    Causes the system to stop processing
  3121.                input until the  requested operation
  3122.                is complete.  You cannot switch tasks
  3123.                when WAIT is specified.
  3124.  
  3125.        NOTIFY  Causes the WIL program to suspend
  3126.                execution until the requested operation
  3127.                completes.  You can perform other tasks
  3128.                and switch between tasks when NOTIFY is
  3129.                specified.
  3130.  
  3131.        WAIT NOTIFY  Same as WAIT
  3132.  
  3133.      If neither WAIT nor NOTIFY is specified, the
  3134.      multimedia operation is started and control
  3135.      returns immediately to the WIL program.
  3136.  
  3137.      In general, if you simply want the WIL program
  3138.      to wait until the multimedia operation is
  3139.      complete, use the NOTIFY keyword.  If you want
  3140.      the system to hang until the operation is
  3141.      complete, use WAIT.  If you just want to start
  3142.      a multimedia operation and have the program
  3143.      continue processing, don't use either keyword.
  3144.  
  3145.      The return value from PlayMedia is whatever
  3146.      string the driver returns.  This will depend on
  3147.      the particular driver, as well as on the type
  3148.      of operation performed.
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.      56
  3167.  
  3168.                                       WIL Update Manual
  3169.  
  3170.  
  3171.  
  3172.        Example:
  3173.         ; Plays a music CD on a CDAudio player.  It
  3174.         plays whatever is in the
  3175.         ; drive, from start to finish
  3176.         stat = PlayMedia("status cdaudio mode")
  3177.         answer = 1
  3178.         If stat == "playing" Then answer =
  3179.         AskYesNo("CD Audio", "CD is
  3180.             Playing.  Stop?")
  3181.         If answer == 0 Then Exit
  3182.         PlayMedia("open cdaudio shareable alias donna
  3183.         notify")
  3184.         PlayMedia("set donna time format tmsf")
  3185.         PlayMedia("play donna from 1")
  3186.         PlayMedia("close donna")
  3187.         Exit
  3188.         :cancel
  3189.         PlayMedia("set cdaudio door open")
  3190.  
  3191.  
  3192.        See Also:
  3193.           Playmidi, PlayWaveForm
  3194.  
  3195.  
  3196.  
  3197.  
  3198.        PlayMidi
  3199.        Plays a MID or RMI sound file.
  3200.  
  3201.  
  3202.        Syntax:
  3203.         PlayMidi (filename, mode)
  3204.  
  3205.        Parameters:
  3206.         (s) filename  name of the MID or RMI sound
  3207.                       file.
  3208.         (i) mode      play mode (see below).
  3209.  
  3210.        Returns:
  3211.         (i)       @TRUE if successful; @FALSE if
  3212.                   unsuccessful.
  3213.  
  3214.        If Windows multimedia sound extensions are
  3215.        present, and MIDI-compatible hardware is
  3216.  
  3217.  
  3218.                                                      57
  3219.  
  3220.      WIL Update Manual
  3221.  
  3222.  
  3223.  
  3224.      installed, this function will play a MID or RMI
  3225.      sound file.  If "filename" is not in the
  3226.      current directory and a directory is not
  3227.      specified, the path will be searched to find
  3228.      the file.
  3229.  
  3230.      If "mode" is set to 0, the WIL program will
  3231.      wait for the sound file to complete before
  3232.      continuing.  If "mode" is set to 1, it will
  3233.      start playing the sound file and continue
  3234.      immediately.
  3235.  
  3236.  
  3237.      Example:
  3238.       PlayMidi("canyon.mid", 1)
  3239.  
  3240.  
  3241.      See Also:
  3242.        PlayMedia, PlayWaveForm
  3243.  
  3244.  
  3245.  
  3246.  
  3247.      PlayWaveForm
  3248.      Plays a WAV sound file.
  3249.  
  3250.  
  3251.      Syntax:
  3252.       PlayWaveForm (filename, mode)
  3253.  
  3254.      Parameters:
  3255.       (s) filename
  3256.       (i) mode  play mode (see below).
  3257.  
  3258.      Returns:
  3259.       (i)       @TRUE if successful; @FALSE if
  3260.                 unsuccessful.
  3261.  
  3262.      If Windows multimedia sound extensions are
  3263.      present, and waveform-compatible hardware is
  3264.      installed, this function will play a WAV sound
  3265.      file.  If "filename" is not in the current
  3266.      directory and a directory is not specified, the
  3267.      path will be searched to find the file.  If
  3268.  
  3269.  
  3270.      58
  3271.  
  3272.                                       WIL Update Manual
  3273.  
  3274.  
  3275.  
  3276.        "filename is not found, the WAV file associated
  3277.        with the "SystemDefault" keyword is played,
  3278.        (unless the "NoDefault" setting is on).
  3279.  
  3280.        Instead of specifying an actual filename, you
  3281.        may specify a keyword name from the [Sound]
  3282.        section of the WIN.INI file (eg,
  3283.        "SystemStart"), in which case the WAV file
  3284.        associated with that keyword name will be
  3285.        played.
  3286.  
  3287.        "Mode" is a bitmask, composed of the following
  3288.        bits:
  3289.  
  3290.           Mode Meaning
  3291.  
  3292.           0    Wait for the sound to end before
  3293.                continuing.
  3294.           1    Don't wait for the sound to end.  Start
  3295.                the sound and immediately  process more
  3296.                statements.
  3297.           2    If sound file not found, do not play a
  3298.                default sound
  3299.           9    Continue playing the sound forever, or
  3300.                until a PlayWaveform("", 0)     statement is
  3301.                executed
  3302.           16   If another sound is already playing, do
  3303.                not interrupt it.  Just ignore  this
  3304.                PlaySound request.
  3305.  
  3306.        You can combine these bits using the binary OR
  3307.        operator.
  3308.  
  3309.        The command PlayWaveForm("", 0) can be used at
  3310.        any time to stop sound.
  3311.  
  3312.  
  3313.        Examples:
  3314.         PlayWaveForm("tada.wav", 0)
  3315.  
  3316.         PlayWaveForm("SystemDefault", 1 | 16)
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322.                                                      59
  3323.  
  3324.      WIL Update Manual
  3325.  
  3326.  
  3327.  
  3328.      See Also:
  3329.        PlayMedia, Playmidi
  3330.  
  3331.  
  3332.  
  3333.  
  3334.      SendKey*
  3335.      Sends keystrokes to the active application.
  3336.  
  3337.  
  3338.      Syntax:
  3339.       SendKey (char-string)
  3340.  
  3341.      Parameters:
  3342.       (s) char-string    string of regular and/or
  3343.                 special characters.
  3344.  
  3345.      Returns:
  3346.       (i)       always 0.
  3347.  
  3348.      This function is used to send keystrokes to the
  3349.      current window, just as if they had been
  3350.      entered from the keyboard.  Any alphanumeric
  3351.      character, and most punctuation marks and other
  3352.      symbols which appear on the keyboard, may be
  3353.      sent simply by placing it in the "char-string."
  3354.      In addition, the following special characters,
  3355.      enclosed in "curly" braces, may be placed in
  3356.      "char-string" to send the corresponding special
  3357.      characters:
  3358.  
  3359.        Key          SendKey equivalent
  3360.  
  3361.        ~            {~}
  3362.        !            {!}
  3363.        ^            {^}
  3364.        +            {+}
  3365.  
  3366.        Backspace    {BACKSPACE} or {BS}
  3367.        Delete       {DELETE} or {DEL}
  3368.        Down Arrow   {DOWN}
  3369.        End          {END}
  3370.        Enter        {ENTER} or ~
  3371.        Escape       {ESCAPE} or {ESC}
  3372.  
  3373.  
  3374.      60
  3375.  
  3376.                                       WIL Update Manual
  3377.  
  3378.  
  3379.  
  3380.           F1 through F12   {F1} through {F12}
  3381.           Home        {HOME}
  3382.           Insert      {INSERT}
  3383.           Left Arrow  {LEFT}
  3384.           Page Down   {PGDN}
  3385.           Page Up     {PGUP}
  3386.           Right Arrow {RIGHT}
  3387.           Space       {SPACE} or {SP}
  3388.           Tab         {TAB}
  3389.           Up Arrow    {UP}
  3390.  
  3391.        To enter an Alt, Control, or Shift key
  3392.        combination, precede the desired character with
  3393.        one or more of the following symbols:
  3394.  
  3395.           Alt         !
  3396.           Control     ^
  3397.           Shift       +
  3398.  
  3399.        To enter Alt-S:
  3400.  
  3401.         SendKey("!S")
  3402.  
  3403.        To enter Ctrl-Shift-F7:
  3404.  
  3405.         SendKey("^+{F7}")
  3406.  
  3407.        You may also repeat a key by enclosing it in
  3408.        braces, followed by a space and the total
  3409.        number of repetitions desired.
  3410.  
  3411.        To type 20 asterisks:
  3412.  
  3413.         SendKey("{* 20}")
  3414.  
  3415.        To move the cursor down 8 lines:
  3416.  
  3417.         SendKey("{DOWN 8}")
  3418.  
  3419.        It is possible to use SendKey to send
  3420.        keystrokes to a DOS application, but only if
  3421.        you are running Windows in 386 Enhanced mode.
  3422.        You would then transfer the keystrokes to the
  3423.        DOS application via the Clipboard.  It is only
  3424.  
  3425.  
  3426.                                                      61
  3427.  
  3428.      WIL Update Manual
  3429.  
  3430.  
  3431.  
  3432.      possible to send standard ASCII characters to
  3433.      DOS applications; you cannot send function key
  3434.      or Alt-key combinations.
  3435.  
  3436.  
  3437.      Examples:
  3438.       ; Start Notepad, and use *.* for filenames
  3439.       Run("notepad.exe", "")
  3440.       SendKey("!FO*.*~")
  3441.  
  3442.       ; run DOS batch file which starts our editor
  3443.       Run("edit.bat", "")
  3444.       ; wait 15 seconds for editor to load
  3445.       Delay(15)
  3446.       ; send string (with carriage return) to the
  3447.       clipboard
  3448.       crlf = StrCat(Num2Char(13), Num2Char(10))
  3449.       ClipPut("Hello%crlf%")
  3450.       ; paste contents of clipboard to DOS window
  3451.       SendKey("!{SP}EP")
  3452.  
  3453.  
  3454.      See Also:
  3455.        SKDebug
  3456.  
  3457.  
  3458.  
  3459.  
  3460.      SKDebug*
  3461.      Controls how SendKey works
  3462.  
  3463.  
  3464.      Syntax:
  3465.       SKDebug (mode)
  3466.  
  3467.      Parameters:
  3468.       (i) mode  @OFF     Keystrokes sent to
  3469.                          application.  No debug file
  3470.                          written.  Default mode.
  3471.                 @ON      Keystrokes sent to application.
  3472.                          Debug file written.
  3473.              @PARSEONLY  Keystrokes not sent to
  3474.                          application.  Debug file
  3475.                          written.
  3476.  
  3477.  
  3478.      62
  3479.  
  3480.                                       WIL Update Manual
  3481.  
  3482.  
  3483.  
  3484.        Returns:
  3485.         (i)    previous SKDebug mode.
  3486.  
  3487.        This function allows you to direct the
  3488.        keystrokes generated by your SendKey statements
  3489.        to a disk file in addition to, or instead of,
  3490.        the application window.  Normally, keystrokes
  3491.        are sent only to the application.  If you
  3492.        specify SKDebug (@ON), keystrokes are sent to a
  3493.        disk file as well as to the application.  If
  3494.        you specify SKDebug (@PARSEONLY), keystrokes
  3495.        are sent only to the disk file, and not to the
  3496.        application.  SKDebug (@OFF) returns to the
  3497.        default mode.
  3498.  
  3499.        By default, the file which will receive the
  3500.        parsed keystrokes is named C:\@@SKDBUG.TXT.
  3501.        You can override this by making an entry in the
  3502.        WWW-PROD.INI file, under the heading(s)
  3503.        [CmdPost] and/or [WinBatch] (depending on which
  3504.        of these program[s] you are using), as follows:
  3505.  
  3506.           SKDFile=debug.fil
  3507.  
  3508.        where debug.fil is the filename, including
  3509.        complete path specification, that you want to
  3510.        receive the keystrokes.
  3511.  
  3512.  
  3513.        Example:
  3514.         Run("notepad.exe", "")
  3515.         SKDebug(@ON)
  3516.         SendKey("!FO*.*~")
  3517.         SKDebug(@OFF)
  3518.  
  3519.  
  3520.        See Also:
  3521.           SendKey
  3522.  
  3523.  
  3524.  
  3525.  
  3526.  
  3527.  
  3528.  
  3529.  
  3530.                                                      63
  3531.  
  3532.      WIL Update Manual
  3533.  
  3534.  
  3535.  
  3536.      SnapShot
  3537.      Takes a snapshot of the screen and pastes it to
  3538.      the clipboard.
  3539.  
  3540.  
  3541.      Syntax:
  3542.       SnapShot (request#)
  3543.  
  3544.      Parameters:
  3545.       (i) request#  see below.
  3546.  
  3547.      Returns:
  3548.       (i)       always 0.
  3549.  
  3550.        Req# Meaning
  3551.  
  3552.        0    Take snapshot of entire screen
  3553.        1    Take snapshot of client area of parent
  3554.             window of active window
  3555.        2    Take snapshot of entire area of parent
  3556.             window of active window
  3557.        3    Take snapshot of client area of active
  3558.             window
  3559.        4    Take snapshot of entire area of active
  3560.             window
  3561.  
  3562.  
  3563.      Example:
  3564.       SnapShot(2)
  3565.  
  3566.  
  3567.      See Also:
  3568.        ClipPut
  3569.  
  3570.  
  3571.  
  3572.  
  3573.      Sounds
  3574.      Turns sounds on or off.
  3575.  
  3576.  
  3577.      Syntax:
  3578.       Sounds (request#)
  3579.  
  3580.  
  3581.  
  3582.      64
  3583.  
  3584.                                       WIL Update Manual
  3585.  
  3586.  
  3587.  
  3588.        Parameters:
  3589.         (i) request#  see below.
  3590.  
  3591.        Returns:
  3592.         (i)       previous Sound setting.
  3593.  
  3594.        If Windows multimedia sound extensions are
  3595.        present, this function turns sounds made by the
  3596.        WIL Interpreter on or off.  Specify a request#
  3597.        of 0 to turn sounds off, and a request# of 1 to
  3598.        turn them on.  By default, the WIL Interpreter
  3599.        makes noise.
  3600.  
  3601.  
  3602.        Example:
  3603.         Sounds(0)
  3604.  
  3605.  
  3606.  
  3607.        StrReplace*
  3608.        Replaces all occurances of a substring with
  3609.        another.
  3610.  
  3611.  
  3612.        Syntax:
  3613.         StrReplace (string, old, new)
  3614.  
  3615.        Parameters:
  3616.         (s) string    string in which to search.
  3617.         (s) old       target substring.
  3618.         (s) new       replacement substring.
  3619.  
  3620.        Returns:
  3621.         (s)       updated "string", with "old"
  3622.                   replaced by "new".
  3623.  
  3624.  
  3625.        StrReplace scans the "string", searching for
  3626.        occurrences of "old" and replacing each
  3627.        occurrence with "new".
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.                                                      65
  3635.  
  3636.      WIL Update Manual
  3637.  
  3638.  
  3639.  
  3640.      Example:
  3641.       ; Copy all INI files to clipboard
  3642.       a = FileItemize("*.ini")
  3643.       crlf = StrCat(Num2Char(13), Num2Char(10))
  3644.       b = StrReplace(a, " ", crlf)
  3645.       ClipPut(b)
  3646.  
  3647.      See Also:
  3648.        StrIndex, StrScan, StrSub
  3649.  
  3650.  
  3651.  
  3652.  
  3653.      TextSelect
  3654.      Allows the user to choose an item from an
  3655.      unsorted listbox.
  3656.  
  3657.  
  3658.      Syntax:
  3659.       TextSelect (title, list, delimiter)
  3660.  
  3661.      Parameters:
  3662.       (s) title      the title of dialog box to display.
  3663.       (s) list       a string containing a list of items
  3664.                      to choose from.
  3665.       (s) delimiter  a string containing the
  3666.                      character to act as delimiter
  3667.                      between items in the list.
  3668.  
  3669.      Returns:
  3670.       (s)            the selected item.
  3671.  
  3672.      This function displays a dialog box with a
  3673.      listbox inside.  This listbox is filled with an
  3674.      unsorted list of items taken from a string you
  3675.      provide to the function.
  3676.  
  3677.      Each item in the string must be separated
  3678.      (delimited) by a character, which you also pass
  3679.      to the function.
  3680.  
  3681.      The user selects one of the items by either
  3682.      doubleclicking on it, or single-clicking and
  3683.      pressing OK.  The item is returned as a string.
  3684.  
  3685.  
  3686.      66
  3687.  
  3688.                                       WIL Update Manual
  3689.  
  3690.  
  3691.  
  3692.        If you create the list with the FileItemize or
  3693.        DirItemize functions you will be using a space-
  3694.        delimited list.  WinItemize, however, creates a
  3695.        tab-delimited list of window titles since
  3696.        titles can have embedded blanks.
  3697.  
  3698.        TextSelect is like ItemSelect, except that with
  3699.        TextSelect the displayed box is larger and the
  3700.        items in the box are not sorted alphabetically.
  3701.  
  3702.  
  3703.        Example:
  3704.         DirChange(DirWindows(0))
  3705.         inifiles = FileItemize("*.ini")
  3706.         ini = TextSelect("Select an INI file to edit",
  3707.         inifiles, " ")
  3708.         If ini == "" Then Exit
  3709.         RunZoom("notepad.exe", ini)
  3710.  
  3711.  
  3712.        See Also:
  3713.           AskLine, DirItemize, FileItemize, ItemSelect,
  3714.           TextBox, WinItemize
  3715.  
  3716.  
  3717.  
  3718.  
  3719.        WaitForKey
  3720.        Waits for a specific key to be pressed.
  3721.  
  3722.  
  3723.        Syntax:
  3724.         WaitForKey (key1, key2, key3, key4, key5)
  3725.  
  3726.        Parameters:
  3727.         (s) key1 - key5         five keystrokes to
  3728.                                 wait for.
  3729.  
  3730.        Returns:
  3731.         (i)           position of the selected
  3732.                       keystroke (1-5).
  3733.  
  3734.        WaitForKey requires five parameters, each of
  3735.        which represents a keystroke (refer to the
  3736.  
  3737.  
  3738.                                                      67
  3739.  
  3740.      WIL Update Manual
  3741.  
  3742.  
  3743.  
  3744.      SendKey function for a list of special keycodes
  3745.      which can be used).  The WIL program will be
  3746.      suspended until one of the specified keys are
  3747.      pressed, at which time the WaitForKey function
  3748.      will return a number from 1 to 5, indicating
  3749.      the position of the "key" that was selected,
  3750.      and the program will continue.  You can specify
  3751.      a null string ("") for one or more of the "key"
  3752.      parameters if you don't need to use all five.
  3753.  
  3754.      WaitForKey will detect its keystrokes in most,
  3755.      but not all, Windows applications.  Any
  3756.      keystroke that is pressed is also passed on to
  3757.      the underlying application.
  3758.  
  3759.  
  3760.      Example:
  3761.       k = WaitForKey("{F11}", "{F12}", "{INSERT}",
  3762.                      "", "")
  3763.       If k == 1 Then Message("WaitForKey", "You
  3764.                      pressed the F11 key")
  3765.       If k == 2 Then Message("WaitForKey", "You
  3766.                      pressed the F12 key")
  3767.       If k == 3 Then Message("WaitForKey", "You
  3768.                      pressed the Insert key")
  3769.  
  3770.  
  3771.      See Also:
  3772.        IsKeyDown
  3773.  
  3774.  
  3775.  
  3776.  
  3777.      WallPaper*
  3778.      Changes the Windows wallpaper.
  3779.  
  3780.  
  3781.      Syntax:
  3782.       WallPaper (bmp-name, tile)
  3783.  
  3784.  
  3785.      Parameters:
  3786.       (s) bmp-name  Name of the BMP wallpaper file.
  3787.       (i) tile  @TRUE if wallpaper should be tiled.
  3788.  
  3789.  
  3790.      68
  3791.  
  3792.                                       WIL Update Manual
  3793.  
  3794.  
  3795.  
  3796.                   @FALSE if wallpaper should not be
  3797.                   tiled.
  3798.  
  3799.        Returns:
  3800.         (i)       always 0
  3801.  
  3802.        This function immediately changes the Windows
  3803.        wallpaper.  It can even be used for wallpaper
  3804.        "slide shows."
  3805.  
  3806.  
  3807.        Example:
  3808.         DirChange("c:\windows")
  3809.         a = FileItemize("*.bmp")
  3810.         a = ItemSelect("Select New paper", a, " ")
  3811.         tile = @FALSE
  3812.         If FileSize(a) < 40000 Then tile = @TRUE
  3813.         Wallpaper(a, tile)
  3814.  
  3815.        See Also:
  3816.           WinParmSet
  3817.  
  3818.  
  3819.  
  3820.  
  3821.        WinConfig*
  3822.        Returns WIN3 mode flags.
  3823.  
  3824.  
  3825.        Syntax:
  3826.         WinConfig ( )
  3827.  
  3828.        Parameters:
  3829.         (none)
  3830.  
  3831.        Returns:
  3832.         (i)       sum of Windows configuration bits.
  3833.  
  3834.  
  3835.        Returns Windows configuration information as a
  3836.        number, which is the sum of the following
  3837.        individual bits:
  3838.  
  3839.  
  3840.  
  3841.  
  3842.                                                      69
  3843.  
  3844.      WIL Update Manual
  3845.  
  3846.  
  3847.  
  3848.        1    Protected Mode
  3849.        2    80286 CPU
  3850.        4    80386 CPU
  3851.        8    80486 CPU
  3852.        16   Standard Mode
  3853.        32   Enhanced Mode
  3854.        64   8086 CPU
  3855.        128  80186 CPU
  3856.        256  Large PageFrame
  3857.        512  Small PageFrame
  3858.        1024 80x87 Installed
  3859.  
  3860.      You will need to use bitwise operators to
  3861.      extract the individual bits.
  3862.  
  3863.  
  3864.      Examples:
  3865.       cfg = WinConfig()
  3866.       If cfg & 32 Then Display(2, "Windows Mode",
  3867.                        "Enhanced Mode")
  3868.       If cfg & 16 Then Display(2, "Windows Mode",
  3869.                        "Standard Mode")
  3870.       If !(cfg & 1) Then Display(2, "Windows Mode",
  3871.                        "Real Mode")
  3872.  
  3873.       cfg = WinConfig()
  3874.       If cfg & 1024 Then Display(2, "Math co-
  3875.                          processor", "Yes")
  3876.       If !(cfg & 1024) Then Display(2, "Math co-
  3877.                          processor", "No")
  3878.  
  3879.      See Also:
  3880.        NetGetCaps, WinMetrics, WinParmGet,
  3881.        WinResources
  3882.  
  3883.  
  3884.  
  3885.  
  3886.      WinExeName
  3887.      Returns the name of the executable file which
  3888.      created a specified window.
  3889.  
  3890.  
  3891.  
  3892.  
  3893.  
  3894.      70
  3895.  
  3896.                                       WIL Update Manual
  3897.  
  3898.  
  3899.  
  3900.        Syntax:
  3901.         WinExeName (partial-windowname)
  3902.  
  3903.        Parameters:
  3904.         (s) partial-windowname       the initial part
  3905.                         of, or an entire, window name.
  3906.  
  3907.        Returns:
  3908.         (s)                name of the EXE file.
  3909.  
  3910.        Returns the name of the EXE file which created
  3911.        the first window found whose title matches
  3912.        "partial-windowname".
  3913.  
  3914.        "Partial-windowname" is the initial part of a
  3915.        window name, and may be a complete window name.
  3916.        It is case-sensitive.  You should specify
  3917.        enough characters so that "partial-windowname"
  3918.        matches only one existing window.
  3919.  
  3920.  
  3921.        Example:
  3922.         prog = WinExeName("WinCheck")
  3923.         WinClose("WinCheck")
  3924.         Delay(5)
  3925.         Run(prog, "")
  3926.  
  3927.  
  3928.        See Also:
  3929.           Run, WinExist, WinGetActive, WinName
  3930.  
  3931.  
  3932.  
  3933.  
  3934.        WinExist*
  3935.        Tells if specified window exists.
  3936.  
  3937.  
  3938.        Syntax:
  3939.         WinExist (partial-windowname)
  3940.  
  3941.        Parameters:
  3942.         (s) partial-windowname       the initial part
  3943.                         of, or an entire, window name.
  3944.  
  3945.  
  3946.                                                      71
  3947.  
  3948.      WIL Update Manual
  3949.  
  3950.  
  3951.  
  3952.      Returns:
  3953.       (i)                @TRUE if a matching window
  3954.                          is found.
  3955.                          @FALSE if a matching window
  3956.                          is not found.
  3957.  
  3958.      Note: The partial window name you give must
  3959.      match the initial portion of the window name
  3960.      (as appears in the title bar) exactly,
  3961.      including proper case (upper or lower) and
  3962.      punctuation.
  3963.  
  3964.  
  3965.      Example:
  3966.       If WinExist("Clock") == @FALSE Then
  3967.       RunIcon("Clock", "")
  3968.  
  3969.      See Also:
  3970.        WinActivate, WinClose, WinGetActive,
  3971.        WinItemize, WinState
  3972.  
  3973.  
  3974.  
  3975.  
  3976.      WinMetrics
  3977.      Returns Windows system information.
  3978.  
  3979.  
  3980.      Syntax:
  3981.       WinMetrics (request#)
  3982.  
  3983.      Parameters:
  3984.       (i) request#  see below.
  3985.  
  3986.      Returns:
  3987.       (i)       see below.
  3988.  
  3989.      The request# parameter determines what piece of
  3990.      information will be returned.
  3991.  
  3992.  
  3993.  
  3994.  
  3995.  
  3996.  
  3997.  
  3998.      72
  3999.  
  4000.                                       WIL Update Manual
  4001.  
  4002.  
  4003.  
  4004.           Req# Return value
  4005.           -1   Number of colors supported by video
  4006.                driver
  4007.           0    Width of screen, in pixels
  4008.           1    Height of screen, in pixels
  4009.           2    Width of arrow on vertical scrollbar
  4010.           3    Height of arrow on horizontal scrollbar
  4011.           4    Height of window title bar
  4012.           5    Width of window border lines
  4013.           6    Height of window border lines
  4014.           7    Width of dialog box frame
  4015.           8    Height of dialog box frame
  4016.           9    Height of thumb box on scrollbar
  4017.           10   Width of thumb box on scrollbar
  4018.           11   Width of an icon
  4019.           12   Height of an icon
  4020.           13   Width of a cursor
  4021.           14   Height of a cursor
  4022.           15   Height of a one line menu bar
  4023.           16   Width of full screen window
  4024.           17   Height of a full screen window
  4025.           18   Height of Kanji window (Japanese)
  4026.           19   Is a mouse present (0 = No, 1 = Yes)
  4027.           20   Height of arrow on vertical scrollbar
  4028.           21   Width of arrow on horizontal scrollbar
  4029.           22   Is debug version of Windows running (0 =
  4030.                No, 1 = Yes)
  4031.           23   Are Left and Right mouse buttons swapped
  4032.                (0 = No, 1 = Yes)
  4033.           24   Reserved
  4034.           25   Reserved
  4035.           26   Reserved
  4036.           27   Reserved
  4037.           28   Minimum width of a window
  4038.           29   Minimum height of a window
  4039.           30   Width of bitmaps in title bar
  4040.           31   Height of bitmaps in title bar
  4041.           32   Width of sizeable window frame
  4042.           33   Height of sizeable window frame
  4043.           34   Minimum tracking width of a window
  4044.           35   Minimum tracking height of a window
  4045.  
  4046.        Example:
  4047.  
  4048.  
  4049.  
  4050.                                                      73
  4051.  
  4052.      WIL Update Manual
  4053.  
  4054.  
  4055.  
  4056.       mouse = "NO"
  4057.       If WinMetrics(19) == 1 Then mouse = "YES"
  4058.       Message("Is there a mouse installed?", mouse)
  4059.  
  4060.  
  4061.      See Also:
  4062.        MouseInfo, NetGetCaps, WinConfig, WinParmGet,
  4063.        WinResources
  4064.  
  4065.  
  4066.  
  4067.  
  4068.      WinName
  4069.      Returns the name of the current WIL Interpreter
  4070.      window.
  4071.  
  4072.  
  4073.      Syntax:
  4074.       WinName ( )
  4075.  
  4076.      Parameters:
  4077.       (none)
  4078.  
  4079.      Returns:
  4080.       (s)       window name.
  4081.  
  4082.      Returns the name of the current WIL interpreter
  4083.      (eg, Command Post or WinBatch) window.
  4084.  
  4085.  
  4086.      Example:
  4087.       tab = Num2Char(9)
  4088.       allwins = WinItemize()
  4089.       win = ItemSelect("Close window", allwins, tab)
  4090.       If win == WinName() Then Goto nocando
  4091.       WinClose(win)
  4092.       Exit
  4093.       :nocando
  4094.       Message("Sorry", "I can't close myself")
  4095.  
  4096.  
  4097.      See Also:
  4098.        WinActivate, WinExeName, WinGetActive,
  4099.        WinItemize, WinTitle
  4100.  
  4101.  
  4102.      74
  4103.  
  4104.                                       WIL Update Manual
  4105.  
  4106.  
  4107.  
  4108.        WinParmGet
  4109.        Returns system information.
  4110.        *** This function required Windows 3.1 or higher
  4111.  
  4112.  
  4113.        Syntax:
  4114.         WinParmGet (request#)
  4115.  
  4116.        Parameters:
  4117.         (i) request#  see below.
  4118.  
  4119.        Returns:
  4120.         (s)       see below.
  4121.  
  4122.        The request# parameter determines what piece of
  4123.        information will be returned.
  4124.  
  4125.           Req#   Meaning  Return value
  4126.  
  4127.  
  4128.  
  4129.  
  4130.  
  4131.  
  4132.  
  4133.  
  4134.  
  4135.  
  4136.  
  4137.  
  4138.  
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.  
  4147.  
  4148.  
  4149.  
  4150.  
  4151.  
  4152.  
  4153.  
  4154.                                                      75
  4155.  
  4156.      WIL Update Manual
  4157.  
  4158.  
  4159.  
  4160.        1   Beeping      0 = Off, 1 = On
  4161.        2   Mouse sensitivity   "threshold1 threshold2
  4162.            speed"
  4163.        3   Border Width Width in pixels
  4164.        4   Keyboard Speed Keyboardbd Repeat rate
  4165.        5   LangDriver   name of LANGUAGE.DLL
  4166.        6   Horiz. Icon Spacing Spacing in pixels
  4167.        7   Screen Save Timeout Timeout in seconds
  4168.        8   Is screen saver enabled  0 = No, 1 = Yes
  4169.        9   Desktop Grid size   Grid Size
  4170.        10  Wallpaper BMP file  BMP file name
  4171.        11  Desktop Pattern     Pattern codes (string
  4172.            of 8 space-delimited nums.)
  4173.        12  Keyboard Delay   Delay in
  4174.            milliseconds
  4175.        13  Vertical Icon Spacing    Spacing in pixels
  4176.        14  IconTitleWrap0 = No, 1 = Yes
  4177.        15  MenuDropAlign    0 = Right, 1
  4178.            = Left
  4179.        16  DoubleClickWidth    Allowable horiz.
  4180.            movement in pixels for DblClick
  4181.        17  DoubleClickHeight   Allowable vert.
  4182.            movement in pixels for DblClick
  4183.        18  DoubleClickSpeed    Max time in millisecs
  4184.            between clicks for DblClick
  4185.        19  MouseButtonSwap     0 = Not swapped, 1 =
  4186.            swapped
  4187.        20  Fast Task Switch 0 = Off, 1 =
  4188.            On
  4189.  
  4190.  
  4191.  
  4192.  
  4193.  
  4194.  
  4195.      Example:
  4196.       If WinParmGet(8) == 1 Then Message("", "Screen
  4197.                             saver is active")
  4198.  
  4199.  
  4200.      See Also:
  4201.        MouseInfo, NetGetCaps, WinConfig, WinMetrics,
  4202.        WinParmSet, WinResources
  4203.  
  4204.  
  4205.  
  4206.      76
  4207.  
  4208.                                       WIL Update Manual
  4209.  
  4210.  
  4211.  
  4212.        WinParmSet
  4213.        Sets system information.
  4214.        *** This function required Windows 3.1 or higher
  4215.  
  4216.        Syntax:
  4217.         WinParmSet (request#, new-value, ini-control)
  4218.  
  4219.        Parameters:
  4220.         (i) request#    see WinParmGet
  4221.         (s) new-value   see WinParmGet
  4222.         (i) ini-control see below.
  4223.  
  4224.        Returns:
  4225.         (int)     previous value of the setting.
  4226.  
  4227.        See WinParmSet for a list of valid request#'s
  4228.        and values.
  4229.  
  4230.        The "ini-control" parameter determines to what
  4231.        extent the value gets updated:
  4232.  
  4233.           0 Set system value in memory only for future
  4234.             reference
  4235.           1 Write new value to appropriate INI file
  4236.           2 Broadcast message to all applications
  4237.             informing them of new value
  4238.           3 Both 1 and 2
  4239.  
  4240.  
  4241.        Example:
  4242.         WinParmSet(9, "2", 3)   ; sets desktop grid
  4243.         size to 2
  4244.  
  4245.  
  4246.        See Also:
  4247.           WallPaper, WinParmGet
  4248.  
  4249.  
  4250.  
  4251.  
  4252.        WinPlaceGet
  4253.        Returns window coordinates.
  4254.  
  4255.  
  4256.  
  4257.  
  4258.                                                      77
  4259.  
  4260.      WIL Update Manual
  4261.  
  4262.  
  4263.  
  4264.      Syntax:
  4265.       WinPlaceGet (win-type, partial-windowname)
  4266.       *** Requires WIndows 3.1 or higher
  4267.  
  4268.      Parameters:
  4269.       (i) win-type            @ICON, @NORMAL, or
  4270.                               @ZOOMED
  4271.       (s) partial-windowname       the initial part
  4272.                       of, or an entire, window name.
  4273.  
  4274.      Returns:
  4275.       (s)                window coordinates (see
  4276.                          below).
  4277.  
  4278.      This function returns the coordinates for an
  4279.      iconized, normal, or zoomed window.
  4280.  
  4281.      "Partial-windowname" is the initial part of a
  4282.      window name, and may be a complete window name.
  4283.      It is case-sensitive.  You should specify
  4284.      enough characters so that "partial-windowname"
  4285.      matches only one existing window.  If it
  4286.      matches more than one window, the most recently
  4287.      accessed window which it matches will be used.
  4288.  
  4289.      The returned value is a string of either 2 or 4
  4290.      numbers, as follows:
  4291.  
  4292.        Iconic windows    "x y"     (upper left
  4293.                           corner of the icon)
  4294.        Normal windows    "upper-x upper-y lower-x
  4295.                           lower-y"
  4296.        Zoomed windows    "x y"     (upper left
  4297.                           corner of the window)
  4298.  
  4299.      All coordinates are relative to a virtual
  4300.      1000x1000 screen.
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307.  
  4308.  
  4309.  
  4310.      78
  4311.  
  4312.                                       WIL Update Manual
  4313.  
  4314.  
  4315.  
  4316.        Examples:
  4317.         Run("clock.exe", "")
  4318.         pos = WinPlaceGet(@NORMAL, "Clock")
  4319.         Delay(2)
  4320.         WinPlaceSet(@NORMAL, "Clock", "250 250 750
  4321.                                        750")
  4322.         Delay(2)
  4323.         WinPlaceSet(@NORMAL, "Clock", pos)
  4324.  
  4325.  
  4326.        See Also:
  4327.           WinGetActive, WinItemize, WinPlaceSet,
  4328.           WinPosition, WinState
  4329.  
  4330.  
  4331.  
  4332.  
  4333.        WinPlaceSet
  4334.        Sets window coordinates.
  4335.        ***Requires Windows 3.1 or higher
  4336.  
  4337.        Syntax:
  4338.         WinPlaceSet (win-type, partial-windowname,
  4339.                   position-string)
  4340.  
  4341.        Parameters:
  4342.         (i) win-type            @ICON, @NORMAL, or
  4343.                                 @ZOOMED
  4344.         (s) partial-windowname  the initial part of, or
  4345.                                 an entire, window name.
  4346.         (s) position-string     window
  4347.                                 coordinates (see below).
  4348.  
  4349.        Returns:
  4350.         (s)       previous coordinates.
  4351.  
  4352.        This function sets the coordinates for an
  4353.        iconized, normal, or zoomed window.  The window
  4354.        does not have to be in the desired state to set
  4355.        the coordinates; for example, you can set the
  4356.        iconized position for a normal window so that
  4357.        when the window is subsequently iconized, it
  4358.        will go to the coordinates that you've set.
  4359.  
  4360.  
  4361.                                                      79
  4362.  
  4363.      WIL Update Manual
  4364.  
  4365.  
  4366.  
  4367.      "Partial-windowname" is the initial part of a
  4368.      window name, and may be a complete window name.
  4369.      It is case-sensitive.  You should specify
  4370.      enough characters so that "partial-windowname"
  4371.      matches only one existing window.  If it
  4372.      matches more than one window, the most recently
  4373.      accessed window which it matches will be used.
  4374.  
  4375.      "Position-string" is a string of either 2 or 4
  4376.      numbers, as follows:
  4377.  
  4378.        Iconic windows    "x y"     (upper left
  4379.                           corner of the icon)
  4380.        Normal windows    "upper-x upper-y lower-x
  4381.                           lower-y"
  4382.        Zoomed windows    "x y"     (upper left
  4383.                           corner of the window)
  4384.  
  4385.      All coordinates are relative to a virtual
  4386.      1000x1000 screen.
  4387.  
  4388.  
  4389.      Examples:
  4390.       WinPlaceSet(@ICON, "Clock", "10 950")
  4391.  
  4392.       WinPlaceSet(@NORMAL, "Clock", "250 250 750
  4393.       750")
  4394.  
  4395.       WinPlaceSet(@ZOOMED, "Clock", "-5 -5")
  4396.  
  4397.  
  4398.      See Also:
  4399.        IconArrange, WinActivate, WinArrange,
  4400.        WinPlace, WinPlaceGet, WinState
  4401.  
  4402.  
  4403.  
  4404.  
  4405.      WinPosition*
  4406.      Returns Window position.
  4407.  
  4408.  
  4409.      Syntax:
  4410.       WinPosition (partial-windowname)
  4411.  
  4412.  
  4413.      80
  4414.  
  4415.                                       WIL Update Manual
  4416.  
  4417.  
  4418.  
  4419.        Parameters:
  4420.         (s) partial-windowname       the initial part
  4421.                        of, or an entire, window name.
  4422.  
  4423.        Returns:
  4424.         (s)                window coordinates,
  4425.                            delimited by commas.
  4426.  
  4427.  
  4428.        Returns the current window position information
  4429.        for the selected window.  It returns 4 comma-
  4430.        separated numbers (see WinPlace for details).
  4431.  
  4432.  
  4433.        Example:
  4434.         Run("clock.exe", "")       ; start Clock
  4435.         WinPlace(0,0,300,300, "Clock")    ; place
  4436.         Clock
  4437.         pos = WinPosition("Clock") ; save position
  4438.         delay(2)
  4439.         WinPlace(200,200,300,300, "Clock")     ; move
  4440.         Clock
  4441.         delay(2)
  4442.         WinPlace(%pos%, "Clock")   ; restore Clock
  4443.  
  4444.  
  4445.        See Also:
  4446.           WinGetActive, WinItemize, WinPlace,
  4447.           WinPlaceGet, WinState
  4448.  
  4449.  
  4450.  
  4451.  
  4452.        WinResources
  4453.        Returns information on available memory and
  4454.        resources.
  4455.  
  4456.  
  4457.        Syntax:
  4458.         WinResources (request#)
  4459.  
  4460.        Parameters:
  4461.         (i) request#  see below
  4462.  
  4463.  
  4464.  
  4465.                                                      81
  4466.  
  4467.      WIL Update Manual
  4468.  
  4469.  
  4470.  
  4471.      Returns:
  4472.       (i)       see below.
  4473.  
  4474.      The value of request# determined the piece of
  4475.      information returned.
  4476.  
  4477.        Req#    Return value
  4478.  
  4479.        0   Total available memory, in bytes
  4480.        1   Theoretical maximum available memory, in
  4481.            bytes
  4482.        2   Percent of free system resources (lower
  4483.            of GDI and USER)
  4484.        3   Percent of free GDI resources
  4485.        4   Percent of free USER resources
  4486.  
  4487.  
  4488.      Example:
  4489.       mem = WinResources(0)
  4490.       Message("Available memory", "%mem% bytes")
  4491.  
  4492.  
  4493.      See Also:
  4494.        WinConfig, WinMetrics, WinParmGet
  4495.  
  4496.  
  4497.  
  4498.  
  4499.      WinState
  4500.      Returns   the current state of a window.
  4501.  
  4502.  
  4503.      Syntax:
  4504.       WinState (partial-windowname)
  4505.  
  4506.      Parameters:
  4507.       (s) partial-windowname       the initial part
  4508.                      of, or an entire, window name.
  4509.  
  4510.      Returns:
  4511.       (i)                window state (see below).
  4512.  
  4513.      "Partial-windowname" is the initial part of a
  4514.      window name, and may be a complete window name.
  4515.  
  4516.  
  4517.      82
  4518.  
  4519.                                       WIL Update Manual
  4520.  
  4521.  
  4522.  
  4523.        It is case-sensitive.  You should specify
  4524.        enough characters so that "partial-windowname"
  4525.        matches only one existing window.  If it
  4526.        matches more than one window, the most recently
  4527.        accessed window which it matches will be used.
  4528.  
  4529.        Possible return values are as follows.
  4530.  
  4531.           Value Symbolic name   Meaning
  4532.  
  4533.           -1    @HIDDEN     Specified window exists,
  4534.                             but is hidden
  4535.           0     @FALSE      Specified window does not
  4536.                             exist
  4537.           1     @ICON       Specified window is iconic
  4538.                             (minimized)
  4539.           2     @NORMAL     Specified window is a
  4540.                             normal window
  4541.           3     @ZOOMED     Specified window is zoomed
  4542.                             (maximized)
  4543.  
  4544.  
  4545.        Example:
  4546.         If WinState("Notepad") == @ICON Then
  4547.         WinShow("Notepad")
  4548.  
  4549.  
  4550.        See Also:
  4551.           Run, WinExist, WinGetActive, WinHide,
  4552.           WinIconize, WinItemize, WinPlace,
  4553.           WinPlaceGet, WinPlaceSet, WinPosition,
  4554.           WinShow, WinZoom
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.                                                      83
  4570.  
  4571.      WIL Update Manual
  4572.  
  4573.  
  4574.  
  4575.  
  4576.  
  4577.  
  4578.                      OTHER FEATURES
  4579.  
  4580.  
  4581.  
  4582.  
  4583.  
  4584.  
  4585.      Changes to both Command Post and WinBatch
  4586.  
  4587.  
  4588.  
  4589.      :CANCEL
  4590.      With previous versions of Command Post and
  4591.      WinBatch, one of the problems was that if the
  4592.      user pressed the Cancel button in a dialog box,
  4593.      processing terminated immediately.  Now, if the
  4594.      user presses the Cancel button, the label
  4595.      :CANCEL will be searched for in the WIL
  4596.      program, and, if found, control will be
  4597.      transferred there.  If no label :CANCEL is
  4598.      found, processing simply stops (like it did
  4599.      before).
  4600.  
  4601.      This allows the programmer to perform various
  4602.      bits of cleanup processing after a user presses
  4603.      Cancel.
  4604.  
  4605.  
  4606.  
  4607.  
  4608.      Default program for unknown extension
  4609.      It is difficult to set up file "associations"
  4610.      (the [Extensions] section of the WIN.INI file)
  4611.      for all the possible file extensions that one
  4612.      might ever encounter.  Users often simply want
  4613.      a way to view a file with an unknown extension,
  4614.      in order to examine or identify its contents.
  4615.      With this in mind, Command Post and WinBatch
  4616.      will now search for an asterisk (*) in the
  4617.      [Extensions] section of the WIN.INI file, if
  4618.  
  4619.  
  4620.  
  4621.      84
  4622.  
  4623.                                       WIL Update Manual
  4624.  
  4625.  
  4626.  
  4627.        there is no explicit entry for the desired
  4628.        file's extension.
  4629.  
  4630.        This is useful, especially in Command Post,
  4631.        when you can now double click on a random file,
  4632.        like README.1ST, and have something happen. To
  4633.        make something happen:
  4634.  
  4635.           In the [Extensions] section of the WIN.INI
  4636.        file add a line such as:
  4637.  
  4638.             *=browser.exe
  4639.  
  4640.        Then, whenever a file is double clicked in
  4641.        Command Post, and the extension is not
  4642.        recognized, Command Post will pass the file to
  4643.        Browser.  Note that the customary ^.ext is not
  4644.        included in the line above.
  4645.  
  4646.        In WinBatch, this feature comes into play when
  4647.        the program attempts to process a command like
  4648.        the following:
  4649.  
  4650.           Run("readme.1st", "")
  4651.  
  4652.        This would be translated to:
  4653.  
  4654.           Run("browser.exe", "readme.1st")
  4655.  
  4656.  
  4657.  
  4658.  
  4659.        Better program launch diagnostics
  4660.        In earlier versions of Command Post and
  4661.        WinBatch, if, for some obscure reason, a
  4662.        program could not be launched, Command Post and
  4663.        WinBatch either simply beeped, put up a "Cannot
  4664.        Run" message, or ignored the situation -- not
  4665.        exactly conducive to helping the user figure
  4666.        out what went wrong.  The new versions now put
  4667.        up more detailed error messages to assist the
  4668.        user in fixing the problem.
  4669.  
  4670.  
  4671.  
  4672.  
  4673.                                                      85
  4674.  
  4675.      WIL Update Manual
  4676.  
  4677.  
  4678.  
  4679.  
  4680.      New INI file
  4681.      All of the Command Post and WinBatch items that
  4682.      were previously stored in the WIN.INI file have
  4683.      been moved to the WWW-PROD.INI file.
  4684.  
  4685.  
  4686.  
  4687.  
  4688.      Improved Display function
  4689.      If the Display command is cancelled, either by
  4690.      a mouse click or by a keystroke, it returns
  4691.      @TRUE; otherwise, it returns @FALSE.  Also,
  4692.      Display can now display a message for up to
  4693.      3600 seconds, rather than the previous limit of
  4694.      15 seconds.
  4695.  
  4696.  
  4697.  
  4698.  
  4699.      Longer Delay
  4700.      The Delay function now has a maximum limit of
  4701.      3600 seconds, rather than the previous limit of
  4702.      15 seconds.
  4703.  
  4704.  
  4705.  
  4706.  
  4707.      Change in DialogBox
  4708.      The DialogBox function (new in Command Post)
  4709.      has been modified to require that a file name
  4710.      be selected if a file list box is in the dialog
  4711.      box.  However, this behavior may be altered
  4712.      using IntControl(4), which will allow a
  4713.      directory only to be returned (like it did
  4714.      before, in WinBatch).
  4715.  
  4716.  
  4717.  
  4718.  
  4719.      Partial windowname option
  4720.      Functions that accept a partial windowname
  4721.      (like WinShow("Clo")) can now be directed to
  4722.      only accept an exact match, just by ending the
  4723.  
  4724.  
  4725.      86
  4726.  
  4727.                                       WIL Update Manual
  4728.  
  4729.  
  4730.  
  4731.        window name with a tilde ( ~ ).  For example,
  4732.        WinShow("Clock~")
  4733.  
  4734.  
  4735.  
  4736.  
  4737.        Improved StrTrim
  4738.        The StrTrim function has been modified to now
  4739.        remove tabs, as well as spaces, from the
  4740.        beginning and end of a string.
  4741.  
  4742.  
  4743.  
  4744.  
  4745.        Noise
  4746.        Sounds have been added to Command Post and
  4747.        WinBatch dialog boxes.  If you have the
  4748.        Multimedia extensions and hardware capable of
  4749.        playing WAV waveform files, sounds will sound
  4750.        at various points in the execution of Command
  4751.        Post and WinBatch.  Sounds are on by default.
  4752.        Sounds(@OFF) can be used to turn the sounds
  4753.        off.
  4754.  
  4755.        In addition, if you add to the [Sounds] section
  4756.        of your WIN.INI file a line like:
  4757.  
  4758.           StartProgram=CHIMES.WAV,Program Launch
  4759.  
  4760.        then Command Post and WinBatch will make sounds
  4761.        whenever a new program is launched.  Some
  4762.        people seem to like BEAMUP.WAV, which is the
  4763.        sound that occurs when the SS Enterprise's
  4764.        transporter is energized.
  4765.  
  4766.  
  4767.  
  4768.  
  4769.        FileOpen error message
  4770.        The error message returned when the FileOpen
  4771.        command fails has been changed from 3077 (a
  4772.        fatal error) to 1077 (a minor error, which can
  4773.        therefore be trapped).
  4774.  
  4775.  
  4776.  
  4777.                                                      87
  4778.  
  4779.      WIL Update Manual
  4780.  
  4781.  
  4782.  
  4783.      Changes to Command Post only
  4784.  
  4785.  
  4786.  
  4787.      Hotkeys
  4788.      Hotkeys can now be assigned to any menu item,
  4789.      and will cause the menu item to be executed
  4790.      when the hotkey is pressed.  Most single keys
  4791.      and key combinations may be used as hotkeys,
  4792.      with the exception of ALT and ALT-SHIFT key
  4793.      combinations (although you may use ALT-CTRL
  4794.      combinations), and with the exception of the
  4795.      F10 key.  Refer to SendKey for a list of
  4796.      special keycodes which may be used.
  4797.  
  4798.      To assign a hotkey to a menu item, place a
  4799.      backslash after the drop-down menu item,
  4800.      followed by the hotkey definition.  For
  4801.      example:
  4802.  
  4803.        Stuff
  4804.         Start Clock  \  ^+C
  4805.           Run("CLOCK.EXE", "")
  4806.         Get Phonebook  \  ^+P
  4807.           DirChange("C:\NOTES")
  4808.           Run("CARDFILE.EXE", "PHONES.CRD")
  4809.        Games
  4810.         Solitaire  \  {F2}
  4811.           Run("SOL.EXE", "")
  4812.         Reversi  \  {F3}
  4813.           Run("REVERSI.EXE", "")
  4814.  
  4815.      Note that you can override some of Command
  4816.      Post's built in functions by using hotkeys.
  4817.      For example, if you assign ^C as a menu item
  4818.      hotkey, you will no longer be able to change to
  4819.      the C drive by pressing ^C.
  4820.  
  4821.  
  4822.  
  4823.  
  4824.      Multiple menu levels
  4825.      Previous versions of Command Posts allowed only
  4826.      a single level of drop-down menus.  Command
  4827.  
  4828.  
  4829.      88
  4830.  
  4831.                                       WIL Update Manual
  4832.  
  4833.  
  4834.  
  4835.        Post now supports any combination of the
  4836.        following:
  4837.  
  4838.         1. Immediate execution menu items.  Select the
  4839.         item from the menu bar and it gets executed.
  4840.         No drop-down menus appear.
  4841.  
  4842.         2. Single level drop-down items.  These are
  4843.         what Command Post always did.
  4844.  
  4845.         3. Double level drop-down items - When a
  4846.         Single level drop-down menu item is selected,
  4847.         even more menu items can appear in a new drop-
  4848.         down menu.
  4849.  
  4850.         4. Triple level drop-down items - When a
  4851.         Double level drop-down menu item is selected,
  4852.         even more menu items can appear in yet another
  4853.         new drop-down menu.
  4854.  
  4855.  
  4856.  
  4857.  
  4858.        Window placement on startup
  4859.        Command Post now saves considerable time on
  4860.        startup of both the initial window and
  4861.        subsequent Command Post windows (up to four),
  4862.        by automatically sizing and placing them based
  4863.        upon parameters stored in the WWW-PROD.INI
  4864.        file.
  4865.  
  4866.  
  4867.  
  4868.  
  4869.        Terminate Windows option
  4870.        There is now an option to terminate Windows
  4871.        when the last Command Post window closes.  This
  4872.        was implemented so that Command Post could, if
  4873.        desired, behave like other shells. This option
  4874.        is controlled by using IntControl(11).
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.                                                      89
  4882.  
  4883.      WIL Update Manual
  4884.  
  4885.  
  4886.  
  4887.  
  4888.      File attribute display
  4889.      File attributes are now displayed when in the
  4890.      Long view mode.
  4891.  
  4892.  
  4893.  
  4894.  
  4895.      Hidden and System files
  4896.      Hidden and System files can now be displayed.
  4897.      This option is controlled by using
  4898.      IntControl(5).
  4899.  
  4900.  
  4901.  
  4902.  
  4903.      Parent directory (dot dot)
  4904.      Added a ".." directory at the top of the
  4905.      Command Post file display.  You can double-
  4906.      click on the ".." to move up one directory
  4907.      level (but you cannot highlight it for use in
  4908.      directory operations).
  4909.  
  4910.  
  4911.  
  4912.  
  4913.      Program run options
  4914.      Ctrl-Enter (or Ctrl-DoubleClick will run a
  4915.      selected file zoomed.  Shift-Enter (or Shift-
  4916.      DoubleClick) will run a selected file
  4917.      minimized.
  4918.  
  4919.  
  4920.  
  4921.  
  4922.      Non-displayed menu items
  4923.      If the first character of a Command Post menu
  4924.      item is a @, the item is not displayed on the
  4925.      menu.  This can be useful if you have a hotkey
  4926.      assigned to the item, and thus have no need to
  4927.      actually select it from the menu.
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.      90
  4934.  
  4935.                                       WIL Update Manual
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.                          DIALOG BOXES
  4943.  
  4944.  
  4945.  
  4946.        For each dialog box, you must first create a
  4947.        template file, with a (recommended) WBD
  4948.        extension, which will identify the structure of
  4949.        the dialog box, as well as the variables used
  4950.        by it.  Unlike the other WIL functions, you do
  4951.        not actually pass variables to DialogBox as
  4952.        parameters.  However, the DialogBox function
  4953.        does indeed have the ability to manipulate, and
  4954.        even create, variables.  If you are familiar
  4955.        with programming, you may think of DialogBox as
  4956.        a subroutine, and all the variables it uses as
  4957.        being global.
  4958.  
  4959.        Let's start with a simple example.  Suppose we
  4960.        want to write a WIL program which starts up
  4961.        Notepad, with two options which can be selected
  4962.        at runtime:
  4963.  
  4964.        Here's what the template file will look like:
  4965.  
  4966.         [zoom+1Start editor zoomed]
  4967.         [backup+1Save backup of file]
  4968.  
  4969.        It is an ordinary ASCII file.
  4970.  
  4971.        Some explanation is in order.  First, note the
  4972.        square brackets.  Each element in a WBD file is
  4973.        enclosed in brackets; in this case, there are
  4974.        two distinct elements.  Next, notice that the
  4975.        first items that appear inside the brackets are
  4976.        variable names -- in this case, zoom and
  4977.        backup.  Immediately following the variable
  4978.        name is a plus sign (+), which identifies the
  4979.        elements as being check boxes.  After the +
  4980.        symbol is the number 1, which represents the
  4981.        value that will be assigned to the variable if
  4982.        the box gets checked.  Note that there is no
  4983.  
  4984.  
  4985.                                                      91
  4986.  
  4987.      WIL Update Manual
  4988.  
  4989.  
  4990.  
  4991.      space before or after the + symbol.  Finally,
  4992.      we have the text which will be displayed next
  4993.      to the check box.
  4994.  
  4995.      Now, let's create the WIL program file which
  4996.      will use this WBD template:
  4997.  
  4998.       file = ItemSelect("", FileItemize("*.*"), " ")
  4999.       DialogBox("Edit a file", "edit.wbd")
  5000.       If backup == 0 Then Goto nobackup
  5001.       filebackupname = StrCat(FileRoot(file), ".",
  5002.       "bak")
  5003.       FileCopy(file, filebackupname, @TRUE)
  5004.       :nobackup
  5005.       If zoom == 1 Then Run("notepad.exe", file)
  5006.       If zoom == 1 Then RunZoom("notepad.exe", file)
  5007.  
  5008.      The WBD template file should be in the current
  5009.      directory or in a directory on your path;
  5010.      otherwise, you must give a complete path
  5011.      specification for it when it appears in the
  5012.      DialogBox statement.
  5013.  
  5014.      Now, run the WIL program.  See how the lines in
  5015.      the template file got translated to fields in
  5016.      the dialog box.  Also notice the two buttons
  5017.      that were added at the bottom -- OK and Cancel.
  5018.      Cancel terminates the WIL program entirely.
  5019.  
  5020.      You may want to try running this with various
  5021.      combinations of boxes checked, just to confirm
  5022.      that it works properly.  It should.
  5023.  
  5024.      Now, look again at the WIL program.  Notice how
  5025.      the variables zoom and backup do not appear
  5026.      until after the DialogBox statement.  In
  5027.      essence, these variables are created by the WBD
  5028.      template, and initialized with values of 0.  If
  5029.      the user checks a box, the variable associated
  5030.      with that box is given the value which appears
  5031.      next to the + symbol in the template.  So, if
  5032.      the first box is checked, then zoom will have a
  5033.      value of 1 after the DialogBox statement is
  5034.      executed.  If it remains un-checked, it will
  5035.  
  5036.  
  5037.      92
  5038.  
  5039.                                       WIL Update Manual
  5040.  
  5041.  
  5042.  
  5043.        still have a value of 0.  These values can then
  5044.        be used in your WIL program, as we have done
  5045.        above.
  5046.  
  5047.        Suppose that you want a box to be checked, by
  5048.        default.  All you need to do is to assign a
  5049.        non-zero value to the corresponding variable
  5050.        before you execute the DialogBox statement.
  5051.        For example:
  5052.  
  5053.         file = ItemSelect("", FileItemize("*.*"), " ")
  5054.         zoom = 1
  5055.         DialogBox("Edit a file", "edit.wbd")
  5056.         If backup == 0 Then Goto nobackup
  5057.         filebackupname = StrCat(FileRoot(file), ".",
  5058.         "bak")
  5059.         FileCopy(file, filebackupname, @TRUE)
  5060.         :nobackup
  5061.         If zoom == 1 Then Run("notepad.exe", file)
  5062.         If zoom == 1 Then RunZoom("notepad.exe", file)
  5063.  
  5064.        When you run it this time, the first box will
  5065.        already be checked, because we first assigned a
  5066.        value of 1 to the variable zoom.  The variable
  5067.        will still have a value of 1 after the
  5068.        DialogBox statement is executed -- unless the
  5069.        user un-checks the box, in which case it will
  5070.        have a value of 0.  The variable associated
  5071.        with an unchecked box is always equal to 0; the
  5072.        variable associated with a checked box is equal
  5073.        to the value you specify for that box.  For the
  5074.        most part, you would be fine simply using a
  5075.        value of 1 to indicate a checked box.
  5076.  
  5077.        You can change the layout of the WBD template
  5078.        to suit your taste.  For example, this:
  5079.  
  5080.         [zoom+1Start editor zoomed]   [backup+1Save
  5081.         backup of file]
  5082.  
  5083.        would put the two check boxes side by side.
  5084.        However, you may not put tab characters in a
  5085.        template file, so be sure to use spaces instead
  5086.        (unless your editor can convert tabs to
  5087.  
  5088.  
  5089.                                                      93
  5090.  
  5091.      WIL Update Manual
  5092.  
  5093.  
  5094.  
  5095.      spaces).  Also, template files are limited to
  5096.      20 lines, and to the first 60 columns
  5097.  
  5098.      The next element which you can use in a dialog
  5099.      box is the radio button.  Whereas you can have
  5100.      several check boxes checked at one time, the
  5101.      radio button gets its name from the five-button
  5102.      car radio, which can only have one station
  5103.      selected at a time.  You can have more than one
  5104.      group of radio buttons, but only one button in
  5105.      each group may be "pressed."  Therefore, this
  5106.      is ideal for situations where the user must
  5107.      make a choice from multiple alternatives:
  5108.  
  5109.      Here's a group of four radio buttons:
  5110.  
  5111.       [editor^1Notepad]       [editor^2WinEdit]
  5112.       [editor^3Write]         [editor^4WinWord]
  5113.  
  5114.      Let's look at how these are different from
  5115.      check boxes.  First, the symbol which
  5116.      identifies a radio button is a caret (^),
  5117.      instead of a +.  Second, each of the buttons
  5118.      has the same variable name (editor).  And
  5119.      third, each button has a unique value following
  5120.      the ^ symbol.
  5121.  
  5122.      This should make sense if you consider what we
  5123.      are trying to accomplish: we want to obtain a
  5124.      value for the variable editor.  The user has
  5125.      four programs to choose from, and he must
  5126.      choose one, and only one.  As you have probably
  5127.      guessed, the value associated with the button
  5128.      which the user "pushes" will be assigned to
  5129.      editor.
  5130.  
  5131.      Let's add this to our existing EDIT.WBD
  5132.      template:
  5133.  
  5134.       [zoom+1Start editor zoomed]
  5135.       [backup+1Save backup of file]
  5136.       [editor^1Notepad]       [editor^2WinEdit]
  5137.       [editor^3Write]         [editor^4WinWord]
  5138.  
  5139.  
  5140.  
  5141.      94
  5142.  
  5143.                                       WIL Update Manual
  5144.  
  5145.  
  5146.  
  5147.        and expand our WIL program to take advantage of
  5148.        it:
  5149.  
  5150.         file = ItemSelect("", FileItemize("*.*"), " ")
  5151.         zoom = 1
  5152.         DialogBox("Edit a file", "edit.wbd")
  5153.         If backup == 0 Then Goto nobackup
  5154.         filebackupname = StrCat(FileRoot(file), ".",
  5155.         "bak")
  5156.         FileCopy(file, filebackupname, @TRUE)
  5157.         :nobackup
  5158.         If zoom == 0 Then runcmd = "Run"
  5159.         If zoom == 1 Then runcmd = "RunZoom"
  5160.         If editor == 1 Then %runcmd%("notepad.exe",
  5161.         file)
  5162.         If editor == 2 Then %runcmd%("winedit.exe",
  5163.         file)
  5164.         If editor == 3 Then %runcmd%("write.exe",
  5165.         file)
  5166.         If editor == 4 Then %runcmd%("winword.exe",
  5167.         file)
  5168.  
  5169.        (We're using the variable runcmd to avoid
  5170.        having to code eight separate Run and RunZoom
  5171.        statements.  Pretty clever, isn't it.)
  5172.  
  5173.        Look at how we are testing the value of editor
  5174.        to determine which program to run.  When the
  5175.        DialogBox statement is executed, the first
  5176.        radio button in each group is selected,
  5177.        regardless of its value.  In this case, the
  5178.        first button appearing in the template, in the
  5179.        editor group, has a value of 1, so, unless the
  5180.        user selects a different button, the variable
  5181.        editor will have a value of 1 after DialogBox
  5182.        finishes, and Notepad will be run.  If the user
  5183.        selects the WinEdit button, editor will have a
  5184.        value of 2 , and Winedit will be run.
  5185.  
  5186.        Another important element which you can use in
  5187.        your templates is the file selection list box,
  5188.        which combines the functionality of DirItemize,
  5189.        FileItemize, and ItemSelect.  It has the
  5190.        following form:
  5191.  
  5192.  
  5193.                                                      95
  5194.  
  5195.      WIL Update Manual
  5196.  
  5197.  
  5198.  
  5199.       [file\                       ]
  5200.       [file\                       ]
  5201.       [file\                       ]
  5202.       [file\                       ]
  5203.       [file\                       ]
  5204.  
  5205.      Here, file is the variable name (you can use
  5206.      another name instead of file), and the
  5207.      backslash (\) is the symbol which identifies
  5208.      this as a file list element.  The amount of
  5209.      space between the \ symbol and the right
  5210.      bracket will determine the width of the file
  5211.      selection list box.  And the number of
  5212.      occurrences of this element (each must have an
  5213.      identical name) will determine the height of
  5214.      the list box.
  5215.  
  5216.      Let's add this to our template:
  5217.  
  5218.       [zoom+1Start editor zoomed]
  5219.       [backup+1Save backup of file]
  5220.       [editor^1Notepad]       [editor^2WinEdit]
  5221.       [editor^3Write]         [editor^4WinWord]
  5222.       [file\                       ]
  5223.       [file\                       ]
  5224.       [file\                       ]
  5225.       [file\                       ]
  5226.       [file\                       ]
  5227.  
  5228.      and revise our program:
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.      96
  5246.  
  5247.                                       WIL Update Manual
  5248.  
  5249.  
  5250.  
  5251.         zoom = 1
  5252.         DialogBox("Edit a file", "edit.wbd")
  5253.         If backup == 0 Then Goto nobackup
  5254.         filebackupname = StrCat(FileRoot(file), ".",
  5255.         "bak")
  5256.         FileCopy(file, filebackupname, @TRUE)
  5257.         :nobackup
  5258.         If zoom == 0 Then runcmd = "Run"
  5259.         If zoom == 1 Then runcmd = "RunZoom"
  5260.         If editor == 1 Then %runcmd%("notepad.exe",
  5261.         file)
  5262.         If editor == 2 Then %runcmd%("winedit.exe",
  5263.         file)
  5264.         If editor == 3 Then %runcmd%("write.exe",
  5265.         file)
  5266.         If editor == 4 Then %runcmd%("winword.exe",
  5267.         file)
  5268.  
  5269.        All we did was remove the first line from the
  5270.        earlier example, which used FileItemize and
  5271.        ItemSelect to retrieve a file name.
  5272.  
  5273.        By default, the file selection list box uses
  5274.        *.* as a file mask.  If you want to limit the
  5275.        selection to, say, DOC files, assign a value to
  5276.        the appropriate variable before executing the
  5277.        DialogBox statement:
  5278.  
  5279.         file = "*.doc"
  5280.         DialogBox("Edit a file", "edit.wbd")
  5281.  
  5282.        Another element, the file mask edit box, allows
  5283.        the user to change the file mask interactively.
  5284.        It's format is:
  5285.  
  5286.         [file#        ]
  5287.  
  5288.        Where the variable name, in this case file,
  5289.        must be the same as the one used in the file
  5290.        selection list box, and is followed by a number
  5291.        sign (#).  If the user enters a valid wild card
  5292.        mask in the file mask edit box, the file
  5293.        display in the file selection list box will be
  5294.        updated accordingly.  For example, if DOC files
  5295.  
  5296.  
  5297.                                                      97
  5298.  
  5299.      WIL Update Manual
  5300.  
  5301.  
  5302.  
  5303.      are currently shown, and the user types *.TXT,
  5304.      the display will change to show TXT files.
  5305.  
  5306.      You can optionally display the current
  5307.      directory (whose contents are being listed) by
  5308.      including an additional element in the
  5309.      template:
  5310.  
  5311.       [file$                       ]
  5312.  
  5313.      This is identical to the file list element,
  5314.      except the symbol for the directory element is
  5315.      a dollar sign ($).  The variable name must be
  5316.      the same as the one used in the file selection
  5317.      list box:
  5318.  
  5319.       [file$                       ]
  5320.           File mask [file#         ]
  5321.       [file\                       ]
  5322.       [file\                       ]
  5323.       [file\                       ]
  5324.       [file\                       ]
  5325.       [file\                       ]
  5326.  
  5327.      Note that we have included the descriptive text
  5328.      "File mask" next to the file mask edit box.
  5329.      You may place explanatory text anywhere in the
  5330.      template file, as long as it doesn't appear
  5331.      inside square brackets.
  5332.  
  5333.      You can also display a WIL variable in your
  5334.      dialog box by using an element of this form:
  5335.  
  5336.       [varname$]
  5337.  
  5338.      Where the name of the variable is followed by a
  5339.      dollar sign ($).  The WIL Interpreter will
  5340.      replace this with the current value of the
  5341.      variable.
  5342.  
  5343.      Finally, we have the edit box, which allows us
  5344.      to assign user-supplied text to a variable.
  5345.      The edit box element has the form:
  5346.  
  5347.  
  5348.  
  5349.      98
  5350.  
  5351.                                       WIL Update Manual
  5352.  
  5353.  
  5354.  
  5355.         [input#                      ]
  5356.  
  5357.        The variable name (in this case, input) is
  5358.        followed a number sign (#), and the width of
  5359.        the area between the brackets determines the
  5360.        width of the edit box which gets displayed.
  5361.        Whatever the user types in the box gets
  5362.        assigned to the associated variable.  Here is a
  5363.        sample RENAME.WBD template:
  5364.  
  5365.         Select file to be renamed
  5366.         [oldname$                         ]
  5367.         [oldname\                         ]
  5368.         [oldname\                         ]
  5369.         [oldname\                         ]
  5370.         [oldname\                         ]
  5371.  
  5372.         Type new name for the file
  5373.         [newname#                         ]
  5374.  
  5375.        Which could be used with this program:
  5376.  
  5377.         DialogBox("File Rename", "rename.wbd")
  5378.         FileRename(oldname, newname)
  5379.  
  5380.        You will have noticed that there are two
  5381.        symbols -- $ and # -- which have dual meanings,
  5382.        depending on whether or not there is a file
  5383.        list selection variable in the template with
  5384.        the same name.  The three file elements --
  5385.        [file\], [file$], and [file#] -- are a "set",
  5386.        and share a common variable name.  All other
  5387.        variables in your template should have unique
  5388.        names.
  5389.  
  5390.  
  5391.  
  5392.  
  5393.  
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.                                                      99
  5402. 
  5403.